Click here to Skip to main content
15,895,810 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
session still active when browser close
Posted
Comments
Orcun Iyigun 20-Mar-12 17:34pm    
is this supposed to be a question?

1 solution

If you close the browser without logout or session expired function, the session will be remain in server. But next time the server generate new session id for the next request.

When the user closes the page or logs out. You need to clear the session variable with something like (since you didnt tag the language you are working on)
C#
Session.Abandon()

or you set the session value to null.
Now when a user closes the page the global.asax methods gets fired. The method which is getting fired is
C#
Session_End()


Good luck,
OI
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900