Last post Jul 04, 2015 07:07 AM by Weibo Zhang
Jul 03, 2015 03:14 AM|davidinho.ng|LINK
I'm looking for a way to intercept the reason why the event session_end in the global.asax was called, especially I would like to catch the event when the Session.Abandon() was called... is there a way?
Thanks and sorry for my poor english
Jul 03, 2015 04:13 AM|PatriceSc|LINK
With a flag maybe? It's best to explain your final goal. What difference do you want to make between abandonning the session or a timeout? Also it is for InProc only and my personal preference is to avoid using it.
Jul 04, 2015 07:07 AM|Weibo Zhang|LINK
I'm looking for a way to intercept the reason why the event session_end in the global.asax was called
The Session_OnEnd subroutine is run when the Abandon method has been called or when the session has expired. I think you could refer to the following article, it explains why and when the “session_end” was called.
I would like to catch the event when the Session.Abandon() was called
Session.Abandon() removes all the objects stored in a Session. If you do not call the Abandon method explicitly, the server removes these objects and destroys the session when the session times out.It also raises events like Session_End. This is
just a function, not an event in the application life cycle. For more things, you could refer to the following article.
Besides, the following thread provides you a method to record when session abandoned, you could take a look.
I hope it’s useful to you.