views:

71

answers:

3

I need to create a user login/logout/Session expiry tracking page(ASP.Net).. It is obvious that I can invoke my tracking page when user logs in and logs out.. How do I detect session expirey ?

+1  A: 

Your most obvious way in a stateful app is to assume that any hit on a non-login page without being logged in implies that the session has expired.

Plynx
+1  A: 

You can find a demonstration and answer in this article. Detecting ASP.NET Session Timeouts

awright18
IsNewSession is always true for IIS5.
slugster
+1  A: 

use the Session_End event in Global.asax. Keep in mind this event does not fires when sessions are persisted outside of the process (in SQL for example)

F.Aquino