ASP.NET :Access Session variable in global.asax
I have an ASP.NET application and in the Global.asax ' Application Error Event, I am calling a method to trace/log the error.I want to use the session variable content here .I used the below code void Application_Error(object sender, EventArgs e) { //get reference to the source of the exception chain Exception ex = Server.GetLastError().GetBaseException(); //log the details of the exception and page state to the //Windows 2000 Event Log GUI.MailClass objMail = new GUI.MailClass(); string strError = "MESSAGE: " + ex.Message + "<br><br><br>" + "SOURCE: " + ex.Source + "<br>FORM: " + Request.Form