Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

EnablePasswordRetrieval Custom MembershipProvider

Posted on 2007-11-16
2
Medium Priority
?
964 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
McExp earned 1800 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 Ageil
Sammy Ageil earned 200 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 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