afroblanca
Programmer
Can I refer to the Session object inside the Application_Exception handler of my Global.asax?
I want to put some code that looks like this into my Global.asax :
void Application_Error(object sender, EventArgs e)
{
Session["appException"] = Server.GetLastError().GetBaseException();
Response.Redirect("FriendlyErrorPage.aspx");
}
Will this code work? I know that sometimes there are problems with accessing the Session object from Global.asax, but I don't know if I'll run into those inside Application_Error.
I want to put some code that looks like this into my Global.asax :
void Application_Error(object sender, EventArgs e)
{
Session["appException"] = Server.GetLastError().GetBaseException();
Response.Redirect("FriendlyErrorPage.aspx");
}
Will this code work? I know that sometimes there are problems with accessing the Session object from Global.asax, but I don't know if I'll run into those inside Application_Error.