|
-
May 19th, 2009, 11:47 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] password recovery control
I am not familiar with the pwd recovery control. Does it have a built-in data source or something? How does it know which user's email to send to? If not, how does it matches the value/record in the sql database?
-
May 20th, 2009, 02:09 AM
#2
Re: password recovery control
Hey,
The Password Recovery Control is directly linked to the Membership Provider, which in turn (by default) uses the SQL Membership Provider, which means that based on the username that the user puts into the control, it will be able to look up the email address associated with that username and send an email with either a new password, or the original password, depending on the configuration of the Membership provider.
Hope that helps!!
Gary
-
May 20th, 2009, 01:47 PM
#3
Thread Starter
Frenzied Member
Re: password recovery control
OK, so i have this from internet, but how it know which table to get the username and email from though? all the connectionstringname has just the connectionstring with data source and initial catalog.
Code:
<membership defaultProvider ="SqlServerProvider" userIsOnlineTimeWindow="15">
<providers>
<clear />
<add name="SqlServerProvider" type="System.Web.Security.SqlMembershipProvider"
connectionStringName ="ConnectionString"
enablePasswordRetrieval ="true"
enablePasswordReset =" true"
requiresQuestionAndAnswer =" false"
requiresUniqueEmail="true"
passwordFormat="Clear"
/>
</providers>
</membership>
-
May 21st, 2009, 01:45 AM
#4
Re: password recovery control
Hey,
As I said, this is taken care of for you in the Membership Provider. The Provider has methods that control the creation of new users, authenticating users who are logging in, etc, so you don't have to worry about it. The Controls that you then want to use, i.e. Login Control, CreateUserWizard etc, they all make the necessary calls into the Provider to achieve the result they want.
While in Visual Studio, if you click on Website, and then ASP.Net Configuration, this will start a web page that will allow you to administer the User and Roles for your site, which in turn will create the database necessary to hold all of this information for you.
Hope that helps!!
Gary
-
May 21st, 2009, 04:28 PM
#5
Thread Starter
Frenzied Member
Re: password recovery control
oh .. I already had the create user page, and login page within my own codes without using the controls from asp.net... I guess, I will have to hard code the forgot password piece too
-
May 22nd, 2009, 01:45 AM
#6
Re: [RESOLVED] password recovery control
Hey,
If you are using your own database structure then it is possible for you to create your own provider. This is simply a case of creating a class and inheriting from the Membership Provider, and then creating your own implementation of the methods that it requires. That means you will then be able to use all the controls associated with user logins.
You can find more information on that here:
http://msdn.microsoft.com/en-us/library/f1kyba5e.aspx
This functionality is designed for cases when you are using databases other than SQL, for instance, MySQL, Oracle etc, all have implementations of this. Or, if you are already using an existing database, where the table structure is different, as in your case.
Hope that helps!!
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|