3

我的 asp.net 表单身份验证从不注销。

我已经设置了超时:

<authentication mode="Forms">
  <forms timeout="1">
  </forms>
</authentication>

但是在等待 5 分钟后,我更新了页面,我仍然登录。RememberMe 选项设置为 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

预先感谢。

4

0 回答 0