the berserker the berserker - 1 year ago 176
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
Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download