4
Posted on 11:17 PM by prajeesh and filed under , ,
These three methods are used to clear session variables from the server,but the difference is
Session.Abandon includes Session.RemoveAll and also deletes the session id created for the session. So, subsequent request to .aspx page would create a new session with a new session id. Session.RemoveAll will remove all the user defined session variables but still keeps the session active.so if u want to end session you must use Session.Abandon().
Session.Clear() do the same job as Session.RemoveAll(). Shout it kick it on DotNetKicks.com
4
Responses to ... Clearing session variables in asp.net-difference between Session.Abandon(),Session.RemoveAll() and Session.Clear()
Unknown said... April 29, 2008 at 9:58 PM

Hi Prajeesh,
How does IIS communicate at runtime with ASP.NET? Where is ASP.NET at runtime in IIS5? IIS6?
Please post a detail description .It will be usefull for all....

prajeesh said... May 17, 2008 at 2:38 AM

Thank you vinosh,i ll post it soon

Neomal said... October 22, 2008 at 5:31 AM

HI,
I'm having a doubt. Does this Session.Adbadon() work as it claims in FireFox.
In my application when i'm using firefox eventhught i use the code Session.Abandon it does not clear the SessionID

prajeesh said... October 22, 2008 at 10:50 PM

Even though the session state expires after the indicated timeout period, the session ID
lasts as long as the browser session. What this implies is that the same session ID can
represent multiple sessions over time where the instance of the browser remain the same.