Global Asax Session_End
-
Hi, i know than have many problam with the Session_End method in the global.asax file. my question: i have a code than run in the session_end method and this code was no execute. (the code activate other method in other class). maybe i need to do something before? for example: ....Session_End.... { MyClass.MyMethod(); } Thanks.. Tal
-
Hi, i know than have many problam with the Session_End method in the global.asax file. my question: i have a code than run in the session_end method and this code was no execute. (the code activate other method in other class). maybe i need to do something before? for example: ....Session_End.... { MyClass.MyMethod(); } Thanks.. Tal
The Session_End method only runs if there is a persistent session object that times out. The session object is only persisted if you have stored any session variables in it. Also, a common misconception is that the session ends when the browser window is closed, which is not the case. The session ends when the session object on the server times out (by default 20 minutes after the last request).
Experience is the sum of all the mistakes you have done.