Solved

EnablePasswordRetrieval Custom MembershipProvider

Posted on 2007-11-16
2
959 Views
Last Modified: 2012-06-27
I have created a custom membership provider. I have EnablePasswordRetrieval set to true in my config. In my custom provider, I have code to retrieve the password.

But now I am using the PasswordRecovery control and I'm not sure what I need to do with it to get it to mail the password to the user.

Is my code supposed to handle the mailing of the password? What happens when they click the button to submit the form?

Also, can that form be altered to enter the email address instead of the user name and look it up by that?

thanks!
0
Comment
Question by:Starr Duskk
2 Comments
 
LVL 16

Accepted Solution

by:
McExp earned 450 total points
ID: 20302046
The following MSDN pages should give you what you need: -

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.passwordrecovery.aspx

http://msdn2.microsoft.com/en-us/library/ms178341(vs.80).aspx

I'm not sure if you can use the email instead using the stock component, however if you've already the functions to retreive the password, it's not that hard to impliment this from scratch.

Getting a user from the Membership provider, is as follows:-

 MembershipUser UserToRemind = Membership.FindUsersByEmail("email@toMatch.com");
0
 
LVL 27

Assisted Solution

by:Sammy
Sammy earned 50 total points
ID: 20302066
Yes  your code should handle sending the email with the password to the user, after all its your custom provider.
thats being said, the password can not be hashed. simply hashed password will be useless to send to the user since it's not readable
if you inherited from native membership providers, you can use GetPassword to retrieve the password
more on the membership providers here http://msdn2.microsoft.com/en-us/library/f1kyba5e(vs.80).aspx

0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question