the berserker the berserker - 4 months ago 69
ASP.NET (C#) Question session variables on Session_End

I need to access Session variables on Session_End event in global.asax.cs, but HttpContext.Current is null, so none of the session variables are accessible.

a) Can I access user session somehow differently, or

b) Is there any other event jut before Session_End, I could access user's session variables?

Ray Ray

HttpContext.Current is not available inside of Session_End, but you can access the session instance directly with this.Session.