Quantcast
Channel: In ASP.NET, when should I use Session.Clear() rather than Session.Abandon()? - Stack Overflow
Browsing all 5 articles
Browse latest View live

Answer by Kasim Shafiq for In ASP.NET, when should I use Session.Clear()...

Session.Abandon destroys the session as stated above so you should use this when logging someone out. I think a good use of Session.Clear would be for a shopping basket on an ecommerce website. That...

View Article



Answer by shabbirh for In ASP.NET, when should I use Session.Clear() rather...

Only using Session.Clear() when a user logs out can pose a security hole. As the session is still valid as far as the Web Server is concerned. It is then a reasonably trivial matter to sniff, and grab...

View Article

Answer by MatthewMartin for In ASP.NET, when should I use Session.Clear()...

I had this issue and tried both, but had to settle for removing crap like "pageEditState", but not removing user info lest I have to look it up again.public static void RemoveEverythingButUserInfo(){...

View Article

Answer by splattne for In ASP.NET, when should I use Session.Clear() rather...

Session.Abandon()destroys the session and the Session_OnEnd event is triggered. Session.Clear() just removes all values (content) from the Object. The session with the same key is still alive.So, if...

View Article

In ASP.NET, when should I use Session.Clear() rather than Session.Abandon()?

Both Session.Clear() and Session.Abandon() get rid of session variables. As I understand it, Abandon() ends the current session, and causes a new session to be created thus causing the End and Start...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images