Why HttpContext.Current.Session is null in Global.asax? Why HttpContext.Current.Session is null in Global.asax? asp.net asp.net

Why HttpContext.Current.Session is null in Global.asax?


You're not able to use Session on the Application_AuthenticateRequest becauase it's not bound at that moment.

I think you're able to use the event Application_AcquireRequestState.


try to use the below code in page_Load

Response.AppendHeader("Refresh", Convert.ToString(Session.Timeout * 15) + "; URL=SessionExpPage.aspx");