title: HttpContext.Current is null in Application_PreSendRequestHeaders
body: <p>I'm getting a null reference exception when starting my application. Here is the HttpContext.Current null.</p>
  
  <pre><code>protected void Application_PreSendRequestHeaders()
  {
      HttpResponse response = HttpContext.Current.Response;
      if (response.Filter is GZipStream &amp;&amp; response.Headers["Content-encoding"] != "gzip")
      {
          response.AppendHeader("Content-encoding", "gzip");
      }
      else if (response.Filter is DeflateStream &amp;&amp; response.Headers["Content-encoding"] != "deflate")
      {
          response.AppendHeader("Content-encoding", "deflate");
      }
  }
  </code></pre>
  
  <p>Why is it so and how can i get this working?</p>