title: Request is not available in this context
body: <p>I'm running IIS 7 Integrated mode and I'm getting </p>
  
  <p><strong>Request is not available in this context</strong></p>
  
  <p>when I try to access it in a Log4Net related function that is called from <code>Application_Start</code>. This is the line of code I've </p>
  
  <pre><code>if (HttpContext.Current != null &amp;&amp; HttpContext.Current.Request != null)
  </code></pre>
  
  <p>and an exception is being thrown for second comparison. </p>
  
  <p>What else can I check other than checking HttpContext.Current.Request for null??</p>
  
  <hr>
  
  <p>A similar question is posted @ 
  <a href="https://stackoverflow.com/questions/2056398/request-is-not-available-in-this-context-exception-when-runnig-mvc-on-iis7-5">Request is not available in this context exception when runnig mvc on iis7.5</a></p>
  
  <p>but no relevant answer there either.</p>