asp:登录控制,记住我不记得我 [英] asp:Login control, remember me is not remembering me

查看:132
本文介绍了asp:登录控制,记住我不记得我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面上有一个ASP.NET登录控件,其中显示了记住我"复选框.我已经签入了跟踪并且正在创建身份验证cookie,设置了滑动到期时间,并且超时设置为60000,但是当我返回该网站时,就不会记住登录信息.

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?

谢谢

达里尔

推荐答案

正确! 记住我"复选框对您没有任何帮助,为什么要这么做?

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

成功登录后;您可以通过代码创建cookie,并(在进入页面或母版页或其他页面时)尝试读取以前制作的cookie以获取您的凭据.

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.

或者在使用FormsAuthentication时可以使用SetAuthCookie;参考: http://msdn.microsoft.com/en -us/library/sxb3b282(vs.71).aspx

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

这篇关于asp:登录控制,记住我不记得我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆