Reset Password -Membership classes

J

Josh

I'm having trouble resetting a password using these new fangled membership
classes, can anyone tell me whats wrong with this sample?
The membership user is being correctly returned. But I get a null error.



MembershipUser mu = Membership.GetUser(userName);
string newPassword = Membership.GeneratePassword(12, 1);

mu.ChangePassword(mu.ResetPassword(), newPassword);
 
J

Josh

Found the answer in the Web Config I needed this setting...

requiresQuestionAndAnswer="false"
 

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

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top