void Session_Start(object sender, EventArgs e)
// Code that runs when a new session is started
Session.Timeout = 2;
void Session_End(object sender, EventArgs e)
// Code that runs when a session ends.
// Note: The Session_End event is raised only when the sessionstate mode
// is set to InProc in the Web.config file. If session mode is set to StateServer
// or SQLServer, the event is not raised.
these are my code
And it provides NullReferenceException was hanndled by user code and it provides this exception on ";" at session_end event...
If I remember correctly, the session end event doesn't have an HTTP context because it's not initiated by a request; it happens on the server when it decides the session is over, either timed out or abandoned.