Session fixation issue for Multi-page Web application

86 Views Asked by At

Our Web application has multiple pages and doesn't have any logout functionality.We have tried onunload method but it's not working in Chrome browser. We tried onbeforeunload method, but it's getting called for page redirection as well. Is there a way to end the session when the user closes the tab for multi-page web applications?

1

There are 1 best solutions below

2
Rohan Rao On

For particular tab it is not possible, but if entire browser is closed then session can be destroyed.

For browser close you can put below code into your web.config :

<system.web>
    <sessionState mode="InProc"></sessionState>
</system.web>

You can try out ways given in this link: Close/kill the session when the browser or tab is closed