Answered by:
Problem about Session abandonn

Question
-
User-1439768063 posted
Hi every one
I'm developer , i Created Custrom user control for logIn in Project , Following page My cpde :
button code for LogIn is :
//session add
if(UserCheck(txtUser.Text,txtPassword.Text))
session.Add("SessionName",MyObjectClass);
but logOut Code
session.Abandon();
after logOut session has a value
Wednesday, February 20, 2013 3:52 AM
Answers
-
User-1360095595 posted
Try doing Session.Clear() then abandon.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, February 20, 2013 4:05 AM -
User-170601095 posted
Please refere this site for more details
http://support.microsoft.com/kb/899918
key point from the above site
"When you abandon a session, the session ID cookie is not removed from the browser of the user. Therefore, as soon as the session has been abandoned, any new requests to the same application will use the same session ID but will have a new session state instance"
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 21, 2013 7:21 AM
All replies
-
User-1360095595 posted
Try doing Session.Clear() then abandon.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, February 20, 2013 4:05 AM -
User-170601095 posted
Please refere this site for more details
http://support.microsoft.com/kb/899918
key point from the above site
"When you abandon a session, the session ID cookie is not removed from the browser of the user. Therefore, as soon as the session has been abandoned, any new requests to the same application will use the same session ID but will have a new session state instance"
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 21, 2013 7:21 AM -
User544958783 posted
Hi ,
You can try something like this instead:
Session.Contents.Remove("yoursessionid");
Response.Redirect("http://mysite.com/Default.aspx")
You'll probably want to figure out a way to properly resolve the path (in the call to Response.Redirect) so that it works on both your dev box and your deployed web site
Thursday, February 21, 2013 11:21 AM -
User-986818884 posted
you can set session null
like session["Sessionname"]= null
after this you can not get any session value
then use session.abandon()
Monday, February 25, 2013 6:54 AM