Where to write session abandon?
-
I got a problem with ending session abruptly. where to write session abandon? i will explain my problem with an example: let us suppose a yahoo user successfully logged in and transformed to next page ,here if he types some other url at address bar(without signing out), he is tranformed to other web page but his session is still active(as per my application) how to detect that a user is out of our application and where to write session abandon( which event?).how should i proceed further? {note:i tried write at application _begin request but it trows an error saying session cannot used at application level and reducing session time from default time might not solve my problem} Warm regards Rana
-
I got a problem with ending session abruptly. where to write session abandon? i will explain my problem with an example: let us suppose a yahoo user successfully logged in and transformed to next page ,here if he types some other url at address bar(without signing out), he is tranformed to other web page but his session is still active(as per my application) how to detect that a user is out of our application and where to write session abandon( which event?).how should i proceed further? {note:i tried write at application _begin request but it trows an error saying session cannot used at application level and reducing session time from default time might not solve my problem} Warm regards Rana
In the context of ASP.NET, the application is when the web server starts. Actually, it is when the first request to your website arrives. All sessions are running in the same application until the website is taken off line (IIS is stopped for example) What you probably need to look for is the Session start and end events in the global.asax.cs file. However, they won't fire immediately when the user navigates away from your page - there will be a session timeout and the session won't end until it times out.
Do you want to know more? WDevs.com - Member's Software Directories, Blogs, FTP, Mail and Forums