Page Redirect when session end in ASP.Net MVC

Posted by Kaung Sitt Thu on Stack Overflow See other posts from Stack Overflow or by Kaung Sitt Thu
Published on 2010-04-03T04:07:36Z Indexed on 2010/04/03 4:13 UTC
Read the original article Hit count: 278

Filed under:

I would like to do redirect to login when current session end and that config must be working at any View and Controller.

///My current code in Global.asax

protected void Session_End(object sender, EventArgs e) {
Session.Abandon(); //GetPath() is getting currently path // eg. http://localhost/mymvcproject Response.Redirect(PATH.GetPath() + "User/LogOn"); }

© Stack Overflow or respective owner

Related posts about asp.net-mvc