1
我在我的代码有HttpContext.Current.Session["CurrentUser"] = user;
的地方,并在注销我有这个当AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie); HttpContext.Current.Session被破坏时。
public ActionResult LogOff()
{
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
return RedirectToAction("Index", "Home");
}
我只是想确保当我注销HttpContext.Current.Session
也destoyed。如果不是那么它如何摧毁它?
[MSDN](https://msdn.microsoft.com/en-us/library/ms178581.aspx)建议呼叫会话放弃'()'后注销。请参阅链接中的第三个注释。 –