FormsAuthentication.RedirectFromLoginPage(UserName.Text, true);
的true 改为 false

解决方案 »

  1.   

    FormsAuthentication.SignOut();
    Response.Redirect("login.aspx");
      

  2.   

    FormsAuthentication.RedirectFromLoginPage 方法 (String, Boolean)  将已验证身份的用户重定向回最初请求的 URL。Overloads Public Shared Sub RedirectFromLoginPage( _
       ByVal userName As String, _
       ByVal createPersistentCookie As Boolean _
    )参数
    userName 
    用于 Cookie 身份验证的用户名称。这不需要映射到帐户名称,并将由 URL 身份验证使用。 
    createPersistentCookie 
    指定是否应当发出持久性 Cookie(跨浏览器会话保存的 Cookie)。