开发者

How could I implement a trap to indicate ASP.Net Session expiry

开发者 https://www.devze.com 2022-12-20 14:34 出处:网络
I need to create a user login/logout/Session expiry tracking page(ASP.Net).开发者_如何学Python.

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


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.


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消