Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have made a web application,have used form authentication.
There is a default.aspx page which can be open by authenticated users.
on logging out from default page, redirected to Login.aspx page.
There are two different cases-
1st- if i again login to default page from Login.aspx ,then ASP.Net_SessionId remains same.
2nd case-if after logging out from default page,i close browser,and login again then different SessionId is created.

explain the difference.
thanks.
Posted
Updated 21-Feb-12 2:01am
v2
Comments
ZurdoDev 21-Feb-12 8:04am    
Sounds like you are not actually logging the user out and ending their session.

While Logout use
Session.Removeall()
Session.Abandon()

The above code will clear the sessions but it wont clear ASP.Net_SessionID. to clear this one use below code
Response.cookies("ASP.Net_SessionId ").value = string.empty

Regards,
Norbert
 
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