asp:Login control, remember me is not remembering

2019-08-14 01:17发布

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

2条回答
太酷不给撩
2楼-- · 2019-08-14 01:48

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

查看更多
Melony?
3楼-- · 2019-08-14 01:51

I've found that whenever any problems are potentially related to cookies, that Firecookie is an invaluable tool for finding out what is actually going on...

查看更多
登录 后发表回答