我的LogOff操作仅适用于第一个会话-来自同一台计算机上其他浏览器的其他会话无法注销。
此外,当服务器缓存请求时,不会调用LogOff操作。
这是我的LogOff操作:
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult LogOff()
{
MvcAuthentication.Models.ConfirmList.Remove();
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
return RedirectToAction("Index", "Home");
}阻止其他浏览器会话注销的原因是什么?
发布于 2015-10-01 12:25:45
[OutputCacheAttribute(VaryByParam = "*", Duration = 0, NoStore = true)]
public ActionResult Logout()
{
Session.RemoveAll();
FormsAuthentication.SignOut();
return RedirectToAction("Index","Home");
}尝尝这个
https://stackoverflow.com/questions/32861341
复制相似问题