I would like to know the difference between
Session.clear();
Session.Abandon();
Session.RemoveAll();
Please explain the difference I’m struggling with my session sign out.
Thank you in anticipation
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Session.Clear() removes all the content from the Object (values). The session with the same key is still alive.
Session.Abandon() destroys the session and the Session_OnEnd event is triggered. If you use this you will lose session and get a new session key. Consider using this with a “log out”
Session.RemoveAll() like Clear() this method deletes all items that have been added to the Session object’s Contents collection.