【发布时间】:2014-12-23 05:59:58
【问题描述】:
我正在关注这个帖子 Session of the user in mvc 。我的要求是,当用户从 asp.net mvc 应用程序注销并且单击后退按钮时,不应将其重定向到上一页。用户应保留在登录页面上。我已经尝试了上述线程的注销代码,如下所示。
public ActionResult LogOut()
{
FormsAuthentication.SignOut();
Session.Abandon(); // it will clear the session at the end of request
return RedirectToAction("Login", "User");
}
【问题讨论】:
标签: asp.net-mvc