I have created Asp.net MVC4 Web application. In which, when a user logs in and do some browsing and then close the application from browser without logging out,then previously logged user is not logged out and When application is restarted then previously logged user is logged.
What i am willing is that if a user is logged in and close the web application,then user should be logged out instantly.
Note -I have not deployed the application on IIS by now. So, as web is stateless.So,will it work correctly incase of real scenario when applicaiton will be deployed.
Currently, i am checking it on my development machine and browser.
I have seen following sample but No one has clear explanation
automatically logging users out of asp.net website on close
how to kill the session when user closed the browser without logout
So, is there any event that i can handle on dispose or some sort of shutdown as what we have in desktop application. Actually, i have not worked web application before.