web.xml 设置
<sessionState timeout="180" mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false"/>退出过程
public void exit_session()
{
Session["safe"] = null;
Session.Abandon();
Response.Redirect("default.aspx");
}
在INPROC状态下以上方法有效能注销SESSION
但在StateServer状态下,以上方法退出后还是还打开页面,不知大家如何解决???
<sessionState timeout="180" mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false"/>退出过程
public void exit_session()
{
Session["safe"] = null;
Session.Abandon();
Response.Redirect("default.aspx");
}
在INPROC状态下以上方法有效能注销SESSION
但在StateServer状态下,以上方法退出后还是还打开页面,不知大家如何解决???
Session.Abandon();
FormsAuthentication.SignOut();
看这个有用吗,
public void exit_session()
{
Session.Remove("safe");
Response.Redirect("default.aspx");
}