我正在使用ASP.NET MVC 5。 当我登录并保持页面打开几分钟(约20分钟左右)并单击“注销”。它只刷新页面,然后我再次点击Log out to实际注销。
这是一个流程图:
Log In--> Stay for 20 mins--> Log Out --> Refreshs page --> Again Log Out --> Logs out
这是退出操作
[HttpPost]
[Authorize]
[AntiForgeryHandleError]
[ValidateAntiForgeryToken]
public ActionResult LogOff()
{
AuthenticationManager.SignOut();
return RedirectToAction("Index", "Home");
}
没有错误,只需刷新页面。