title: How to obtain the HttpContext in Event Handler
body: <p>I’m trying to obtain the HTTPContext within an Event Handler in a Document Library in MOSS, but all I have is a null value of the HTTPContext.Current, I do the same thing on a List and the HTTPContext is returned. There is a way to obtain the HTTPContext in Document Libraries to access the HTTPContext.Request method? </p>
  
  <p>Thanks for your help</p>
  
  <p>Here is the code:</p>
  
  <pre><code>public class TestContextListItemEventReceiver : SPItemEventReceiver
  {
      HttpContext current;
      static object obj;
  
      /// &lt;summary&gt;
      /// Initializes a new instance of the Microsoft.SharePoint.SPItemEventReceiver class.
      /// &lt;/summary&gt;
      public TestContextListItemEventReceiver()
      {
          current = HttpContext.Current;
      }
  
      public override void ItemAdding(SPItemEventProperties properties)
      {
          obj = current;  
      }
  }
  </code></pre>