Reset Membership Password without Answer

J

jeff

I have a user who forgot both their password and the answer to their
question. I am trying to build an admin page to allow me to reset
passwords, but it seem that all the methods require the answer to
user's questions. Is there something I am missing?

(My passwords are encrypted, not hashed)
 
J

jeff

Ok, I got it to work by changing the membership provider attribute
requiresQuestionAndAnswer to "false". Then I can retrieve the password
with

membershipUser.GetPassword("");

This is great, except that is affected my <ASP:pASSWORDRECOVERY>
control to no longer ask users for their password question.

I need a way to turn off the requiresQuestionAndAnswer property when I
am logged in as an admin, but this property is read only. Suggestions?
Please?
 
J

jeff

I guess I am answering my own questions. :)

I made the default MembershipProvider have
requireQuestionAndAnswer="false" and created an additional
MembershipProvider called "MyMembershipProviderStrong" which is
identical to the default provider except that is has
requireQuestionAndAnswer="true". I then set the <ASP:pASSWORDRECOVERY>
control to explicity use the stronger provider.

MembershipProvider="MyMembershipProviderStrong"

With this setup, my admin pages do not require the answer to the user
questions, but this password recovery control does.

If anyone has better or alternative solutuons, I would love to hear
them.
 
D

Dominick Baier [DevelopMentor]

Hi,

they will be even more meaningless when you hash them instead of encryption -

a) hashing is nonreversible
b) you don't need a key

you won't be able to recover but only to reset a password.

much better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top