System.Web.HttpException was unhandled by user code
<p>I have been using  </p>

<pre><code>protected void Application_Error(Object sender, EventArgs e)
{
    HttpException ex = Server.GetLastError() as HttpException;
    Exception ex_T = ex;
    Session["Ex"] = ex;
    Session["Ex_T"] = ex_T;
    Response.Redirect("~/errorPage.aspx" );
}
</code></pre>

<p>function for exception handling.</p>

<p>Here when i login to the application " sometime" </p>

<p>an exception occurs which details as</p>

<pre><code>System.Web.HttpException was unhandled by user code
  Message="Session state is not available in this context."
  Source="System.Web"
  ErrorCode=-2147467259
  StackTrace:
       at System.Web.HttpApplication.get_Session()
       at Tools.Global.Application_Error(Object sender, EventArgs e) in C:\Myproject\Tools\Global.asax.cs:line 67
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Web.HttpApplication.RaiseOnError()
  InnerException: 
</code></pre>

<p>i cannot track the reason</p>

<p>Can any one help me out</p>

<p>Thanks in advance</p>
