Response is not available in this context in asax file
<p>I have a login page that works only with Firefox. It does not work with any other browsers.</p>

<p>When I checked the event log, I saw a "response is not available in the current context". It tells me that the error is in the global.asax file, at the response.redirect line:</p>

<pre><code>void Session_End(object sender, EventArgs e) 
{
     Response.Redirect("~/Login.aspx?li=1");
    // Code that runs when a session ends. 
    // Note: The Session_End event is raised only when the sessionstate mode
    // is set to InProc in the Web.config file. If session mode is set to StateServer 
    // or SQLServer, the event is not raised.

}
</code></pre>

<p>What could be the problem?</p>

<p>I have tried httpcontext.Current as suggested but then I get a Null Reference Exception, Object Reference not set to an instance of an object</p>

<p>Thank you.</p>
