Assigning Session to nothing or Session.Abandon
I have seen so many developers once they wanted to destroy session, they used
Session(“A”) = Nothing
Its not a good practice to assign nothing object.
Correct:
Session.Abandon
The Session.Abandon method basically destroys a user session.
One thing I would add the current Session object will not delete untill the script on the current page have been processed completely.
Sorry for your inconvience, I have my official blog please visit for complete article:
Posted on April 16, 2008, in ASp.NET 2005, ASP.NET Tips and tagged FormsAuthentication, FormsAuthentication.SignOut, Session Abandon, SignOut. Bookmark the permalink. 2 Comments.






Very useful tip. I will definitely use it.
Wounderfull all most all the developers do so. Before readind this artical i also use same like
Session(”A”) = Nothing
Also FormsAuthentication.SignOut() is new thing for me.
Thanks