Click here to Skip to main content
15,889,595 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i have a simple site with Login page coded in ASP.NET.
i put some user data in Session. every thing works fine when i run bewtween pages in my site.
but when i am closing the browser and return to my site the session is empty.

is it normal?

What I have tried:

i checked the session is enabled and in proc mode
Posted
Updated 29-May-22 1:04am

1 solution

You can't reconnect to a previous session if you close a browser and reopen it: when you open a website the new browser instance will get a new session, and there is no mechanism for storing a Session ID and reconnecting to that instead.

If you want a user to remain logged in over a browser close, you need to store the relevant info in a Cookie and retrieve it when he next connects.
 
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