"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 Angie xu - MSFT on Feb 28, 2013 12:02 AM
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
sjhvi3
0 Points
1 Post
Problem about Session abandonn
Feb 20, 2013 07:52 AM|LINK
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
MetalAsp.Net
All-Star
112032 Points
18231 Posts
Moderator
Re: Problem about Session abandonn
Feb 20, 2013 08:05 AM|LINK
Try doing Session.Clear() then abandon.
Sunil Abraha...
Member
28 Points
5 Posts
Re: Problem about Session abandonn
Feb 21, 2013 11:21 AM|LINK
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"
pushpraj
Member
246 Points
37 Posts
Re: Problem about Session abandonn
Feb 21, 2013 03:21 PM|LINK
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
Software Engineer .Net
bhavikpatel0...
Member
16 Points
4 Posts
Re: Problem about Session abandonn
Feb 25, 2013 10:54 AM|LINK
you can set session null
like session["Sessionname"]= null
after this you can not get any session value
then use session.abandon()
www.wallkens.com