Search code examples
forms-authenticationmembership

asp:Login control, remember me is not remembering me


I have an ASP.NET login control on a page, with the "Remember Me" checkbox displayed. I have checked in trace and the authentication cookie is being created, I have sliding expiration set and a timeout of 60000, yet when I return to the website the login is not being remembered.

Any ideas where else I can check?

Thanks,

Darryl


Solution

  • Correct! The Remember Me checkbox doesn't do anything for you and why should it?

    After succesful login; you could create the cookie from code and (when entering the page or masterpage or whatever) attempt to read the previously made cookie to get your credentials.

    Or you could use the SetAuthCookie when using FormsAuthentication; reference: http://msdn.microsoft.com/en-us/library/sxb3b282(vs.71).aspx