I created a web site, created a login mechanism (via text box, not login device), users logout However, my problem is that if I do not close the logout button or web page or switch to another, how can I understand this situation?
According to your system, when users log out, some entries in DB and deleted operations
I also want to do it with the page closed, the second one switch.
Thank you.
It seems that you are performing a DB operation during logout, and when people logout only Navigate without having to click on, code does not run
In your global.asax, take a look at Session_end that you can do your operation there.
Secure zero session_and (object sender, eventArgse E) {// your code goes here. Since your logout code is likely to be logged in to the user /, so you can terminate the request. How do I authenticate here? Because // it fires at any time when the event ends - even if the user is not logged in! }
Note that if you use it, it actually sets a fire when the IIS session ends, not when the browser closes, by default, 20 minutes of inactivity After the session time
Once you apply it, you can logout page call sessions. Abandon, which will trigger session_andtv. It looks clean for me.
There is an MSDN link with some more information about the events of the session:
Comments
Post a Comment