Click here to Skip to main content
15,745,973 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
how can I kill the session when the user closes the browser?because my server Going to slow down.any one can help me??
Kornfeld Eliyahu Peter 27-Jan-15 8:35am    
If client closes the browser it will kill the session after the session time-out defined in IIS...
In anyway how large the data you are storing on the session? How many sessions do you have?
Why do you think killing sessions will solve your problem?

1 solution

Http is stateless so you can not catch that event with certainty. You either implement heartbeet - but in your situation it might slow down server even more and/or you will need to set the session timeout to a lower value. But you are constrained by the application usage model.

Better do some performance checkup and tuning. Your application might need some face-lifting. Is it really ASP classic?
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