In my ASP.NET web application, I call Session.Abandon() in Page_Load() . I expect this to end the session immediately, and the next time I refer to HttpContext.Current.Session , a new session should be created. However, placing control points in the Session_End and Session_Start in Global.asax means that they are not called until the page has finished rendering.
So, two questions:
1) Why?
2) How can I continue to use HttpContext.Current.Session during the page life cycle after calling Session.Abandon ().
Thanks in advance!
source share