Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

1 solution

adeeeb wrote:
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,


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 wrote:
Second thing that I have trouble is sending an email. Actually, I don't have any SMTP mail server


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



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


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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900