代码之家  ›  专栏  ›  技术社区  ›  ravinsp

Asp.net“记住我”是行不通的FormsAuthentication.RedirectFromLogin页()

  •  2
  • ravinsp  · 技术社区  · 16 年前

    在我使用的登录页面中 FormsAuthentication.RedirectFromLoginPage() CreatePersistenceCookie 参数。我在谷歌搜索并修改了我的网络配置但还记得我功能不起作用。

    这是我的示例代码结构(使用asp.net登录控件作为登录界面)

    if (MyService.ValidateUser(LoginUser.UserName, LoginUser.Password))
    {
       FormsAuthentication.RedirectFromLoginPage(LoginUser.UserName, LoginUser.RememberMeSet);
    }
    

    网络配置

    <forms loginUrl="~/Account/Login.aspx" timeout="21600" cookieless="AutoDetect" name="MySiteAuth" slidingExpiration="true"/>

    谢谢

    1 回复  |  直到 13 年前