在不使用aasp.net的登录控件的情况下实现“记住密码"的概念 [英] implementing 'remember password' concept without using login control in aasp.net

查看:89
本文介绍了在不使用aasp.net的登录控件的情况下实现“记住密码"的概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我需要实现登录页面.如何实现记住密码"
概念,而无需使用登录控件.asp是否具有与此相关的ajax控件.

in my project i need to implement login page. how can i implement ''remember password''
concept without using login control.whether asp have any ajax controls related to this.

推荐答案

1.为此,您将必须实现自定义表单身份验证.

请参阅以下内容:了解并实现ASP.NET自定义表单身份验证 [ ^ ]

2.每当用户选择记住我"选项时,您都将必须在其计算机上部署持久性cookie.该cookie将包含身份验证票证.如果我们看上面的文章,唯一会改变的是:
1. You will have to implement custom forms authentication for this.

refer this: Understanding and Implementing ASP.NET Custom Forms Authentication[^]

2. Whenever user chooses the remember me option you will have to deploy a persistent cookie on his computer. this cookie will contain the authentication ticket. if we look the above article the only thing that will change is:
FormsAuthentication.SetAuthCookie(username, false true);


并设置要记住Cookie/密码的天数.

P.S.阅读此答案不会直接为您提供解决方案.您将必须阅读链接的文章并进行建议的更改以获取解决问题的方法.让我知道您是否需要更多有关此信息.


and set the number of days for which you want the cookie/password to be remembered.

P.S. Reading this answer will not give you the solution directly. you will have to read the linked article and make the suggested change to get solution to your problem. Let me know if you need more on this.


这篇关于在不使用aasp.net的登录控件的情况下实现“记住密码"的概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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