密码恢复控制问题 [英] Password Recovery Control Problem

查看:105
本文介绍了密码恢复控制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用ASP.Net仅1个月.现在,我的项目可能实现控制,使用户可以通过回答问题来恢复密码.我们都知道,Visual Studio或Visual Web Developer具有控件名称"Password Recovery Control",只需拖放即可.到目前为止,我已经在ASP.Net Web管理中设置了用户.但是根据我已经看过的1个视频,当我们在项目或网站中添加新用户或角色时,该项目将生成数据库来存储该用户或角色,但是我从未在项目中看到该视频.我遇到的第二件事是发送电子邮件.实际上,我没有任何SMTP邮件服务器,因此我改用Gmail. 我知道Gmail使用SSL,但是密码恢复控制"的属性没有该属性来启用SSL.所以我通过使用事件发送邮件来解决,但是会导致错误.这是我的代码,我只想向用户发送一封简单的电子邮件,说明他的密码是什么.

I have started with ASP.Net just 1 month. Right now, my project may implement the control that users can recovery their password by answering question. We all know that Visual Studio or Visual Web Developer has a control name Password Recovery Control, just drag and drop. So far I have set user in my ASP.Net Web Administration. But according to 1 video that I already seen, when we add new user or role within the project or website, the project will generate the database to store that, but I never seen that one on my project. Second thing that I have trouble is sending an email. Actually, I don''t have any SMTP mail server, so I use Gmail instead. I know that Gmail use SSL, but on the property of Password Recovery Control doesn''t have the property to see SSL enable. So I work around by using event Sending Mail, but it causes error. Here my code, and I just want to send to user a simple email that say his password is something.

推荐答案

adeeeb写道:

我仅用了一个月就开始使用ASP.Net.现在,我的项目可能会实现控制,使用户可以通过回答问题来恢复密码.我们都知道,Visual Studio或Visual Web Developer具有控件名称"Password Recovery Control",只需拖放即可.到目前为止,我已经在ASP.Net Web管理中设置了用户.但是根据我已经看过的1个视频,当我们在项目或网站中添加新用户或角色时,

I have started with ASP.Net just 1 month. Right now, my project may implement the control that users can recovery their password by answering question. We all know that Visual Studio or Visual Web Developer has a control name Password Recovery Control, just drag and drop. So far I have set user in my ASP.Net Web Administration. But according to 1 video that I already seen, when we add new user or role within the project or website,



要获取该数据库,您需要使用C:\ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ aspnet_regsql.exe,它将提示您输入数据库以在其中创建结构.




To get that database you need to use C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe it will prompt you for a database to create the structure in.


adeeeb写道:

我遇到的第二件事是发送电子邮件.实际上,我没有任何SMTP邮件服务器

Second thing that I have trouble is sending an email. Actually, I don''t have any SMTP mail server



IIS可以作为产品的一部分进行安装.





IIS has one available to be installed as part of the product.



adeeeb写道:

这里是我的代码,我只想向用户发送一封简单的电子邮件,说明他的密码是什么.

Here my code, and I just want to send to user a simple email that say his password is something.



并不是您真正想做的事情,除非您将其重置为随机密码,并让他们在使用新密码登录时进行更改.


我不知道您是否需要通过带有gmail的ssl发送电子邮件,但是如果您使用IIS smtp服务器,则同样也不需要它.假设您要继续沿着这条路走,这是如何做到的

SmtpClient.EnableSsl属性



Not something you really want to be doing, unless you reset it to a random password, and have them change it upon logging in with the new password.


I don''t know if you need to send an email through ssl with gmail, but then again if you use the IIS smtp server, you won''t need it either. Assuming you want to continue down that path, here is how to do that

SmtpClient.EnableSsl Property


这篇关于密码恢复控制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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