Link to home
Start Free TrialLog in
Avatar of eaweb
eawebFlag for undefined

asked on

clear session in classic asp and asp.net(vb)

Hi,

I have a session named session (loggedin) which verifies if a user has log in or not. My problem is when the user closes his browser and re opens it. He can access the page back without having to login again because the session still exist which is not ok.
How can i clear all the sessions when a user closes his browser?  I already know how to clear a  session when a user log out via the logout script by clicking on sign-out, but how can i do the same automatically when they close their browsers.
Avatar of jinal
jinal
Flag of India image

do not persists cookie for session.
open web.config

<sessionstate cookieless="true">
for session state.

http://msdn.microsoft.com/en-us/library/h6bb9cz9(VS.71).aspx

For development first delete all cookie then test your application again after applying this chage.
ASKER CERTIFIED SOLUTION
Avatar of guru_sami
guru_sami
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial