我想问一下关于注销后失去了本届会议:会议在ASP.Net(C#)在Firefox和Chrome
我写的代码,但它仅在Internet Explorer中的工作,而不是在Mozilla Firefox或谷歌铬。在这两种浏览器中,如果我点击后退按钮进行注销,则会返回用户的帐户。
注销页面代码(在页面加载) -
FormsAuthentication.SignOut();
Session.Abandon();
Session["CustomerId"] = null;
FormsAuthentication.RedirectToLoginPage();
在其他每一页或主PAGE-
Response.Cache.SetCacheability(HttpCacheability.NoCache);
if (Session["CustomerId"] == null)
{
Response.Redirect("~/Login.aspx");
}
在web的配置文件 -
<authentication mode="Forms">
<forms name="MyCookie" loginUrl="Login.aspx" protection="All" timeout="90" slidingExpiration="true"></forms>
</authentication>
但是你还在登录吗?如果你点击后退按钮,浏览器可能会返回一个缓存页面。如果您尝试使用Ctrl + F5重新加载页面,您是否仍然登录? – sirrocco 2012-04-26 10:45:38