In this article I will explain how to reset or recover forgot password using passwordrecovery control in asp.net membership.
Description:
In previous post I explained clearly about create users using CreateUserWizard in asp.net membership or programmatically insert user details in membership and create or removes roles in asp.net membership and Assign roles to users .Now I will explain how to get forgot password using passwordrecovery control.
<configuration>
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="administrator@aspdotnet-suresh.com">
<network host="100.33.1.1" port="25"/>
</smtp>
</mailSettings>
</system.net>
</configuration>
|
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Forgot Password in asp.net membership</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:passwordrecovery ID="Passwordrecovery1" runat="server"> </asp:passwordrecovery>
</div>
</form>
</body>
</html>
|
<connectionStrings>
<add name="dbconnection" connectionString="Data Source=SureshDasari;Initial Catalog=AspMembership;Integrated Security=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="administrator@aspdotnet-suresh.com">
<network host="100.33.1.1" port="25"/>
</smtp>
</mailSettings>
|
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="dbconnection" applicationName="SampleApplication"/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="dbconnection" applicationName="SampleApplication"/>
</providers>
</profile>
<roleManager enabled="true">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="dbconnection" applicationName="SampleApplication"/>
</providers>
</roleManager>
|
![]() |
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
|


Subscribe by RSS
Subscribe by Email
36 comments :
Its good work for the beginners..keep it up suresh..
how to configure asp.net smtp??? i mean how to know the smtp server name& port number???plz reply need help
gud
Hi suresh i have tried this one but it is giving me an error when i have clicked the submit button of pwd recovery control as below and i m using sql server2008 and visual studio2008:
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
very very thanks
Sir plz help me i tried as per your instruction but i am getting this error:
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for suresh.gupta405@gmail.com
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.7.1 Unable to relay for suresh.gupta405@gmail.com
@Comment 4....
i hope that problem because of you didn't install asp.net membership database in your sql server. please install it based on this post http://www.aspdotnet-suresh.com/2011/01/how-to-use-custom-database-for-aspnet.html
@suresh gupta....
that problem is because of your smtp server. Please check your smtp server connection correct or not.
sir in above code what will be application name in my case.i mean what is applicationName?
@suresh gupta..
applicationName means your project name
hie there, i want to be able to pass multiple parameters
to another page. currently, i am able to do so, but
somehow i feel it is not the correct way to do it. below
is part of what i have so far.
'first page
Private Sub btnOK_ServerClick(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnOK.Click
Response.Redirect("InputValues.aspx?Requestor=" &
txtRequestor.Text & " Lower= " & txtLower.Text)
End Sub
'second page
Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim strRequestor As String
strRequestor = Request.QueryString("Requestor")
Response.Write("Requestor = " & strRequestor)
End Sub
the output i will get is :
Requestor = * Lower = 10
My question is, how can i pass the 2nd parameter(in the
txtLower.Text) to the next page without passing the
keyword "Lower" and still obtain the same output?
i want my second page to look like this:
Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim strRequestor As String
Dim strLower As String
strRequestor = Request.QueryString("Requestor")
Response.Write("Requestor = " & strRequestor)
Response.Write("
")
strLower = Request.QueryString("Lower")
Response.Write(strLower)
End Sub
Please help, and thanx in advance.
I am creating same application as per your code but i cant able to get password....will u pls help me...
No connection could be made because the target machine actively refused it 100.33.1.1:20
i get this error... can you help me out?
No connection could be made because the target machine actively refused it 100.33.1.1:20
i get this error... can you help me out?
i got the same error but i used port 25
hi Suresh i tried with the code but, When i enter the Username and click on the submit button error like this
We were unable to access your information. Please try again. i have set up the sql connection.
hi i tried this code for forgot password recovery but it gives me error Unrecognized configuration section configuration as i have changed network host value to localhost. can please tell me correct value.
hello sir, this article works fine. but finally i got only one error, that is i got confirmation that
password sent to your email. but actually i have not receiving that mail to my email id. why so ? thanks.
pls send me solution to this id chetan10j@gmail.com
hi suresh,i have read all the articles regarding crystal reports,and i tried to my project its working..but i developing one webapplication,in that application i am using a grid view in one aspx page,in that grid view i have displayed all the database fields,and i provide a option like edit,delete,update,print,view in that grid view.my question is when i click the print option the particular or selected row will be print in the crystal report,but i wont work,,do u have any idea or articles for displaying particular report ,,,thanks
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. pl10sm15290604pbc.1 - gsmtp
I've read the entire article,but the forget password problem is still exist.
hai your demonstration is nice but is works in windows7,if so please mail the process to configure password recovery control.Thank you