我的asp.net表单身份验证永远不会注销。
我已经暂停了它:
<authentication mode="Forms">
<forms timeout="1">
</forms>
</authentication>
但等待5分钟后我更新了页面,我仍然登录.ElemerMe选项设置为false。
我以下一种方式登录:
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
Session.Clear();
e.Authenticated = Authorization.RequestLogin(login_obj.UserName, login_obj.Password);
}
我在登录时检查:
if(!user.Identity.IsAuthenticated)
Server.Transfer("~/deny.aspx");
但是我总是把我和新人重新定向到deny.aspx
提前感谢。