how can i terminate session in mvc2...?
i am working on asp.net mvc2 , i want to know how can i terminate session in mvc2
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Dec 19, 2013, 6:10 AM
hi,
you can use Session.Clear() or Session.RemoveAll() they are immediately remove all items stored in the session.
you can also use Session.Abandon(), which mark fist session to be abandoned at the end of the current request and in the latter request it will write session data for other.
ope this will help you.
Abhay ShankerPosted Dec 19, 2013, 5:47 AM
http://markfreedman.com/index.php/2012/02/28/handling-session-and-authentication-timeouts-in-asp-net-mvc/
Jaganathan BantheswaranPosted Dec 19, 2013, 5:42 AM
Use this,
Session.Abandon();