Author: pessi | Posted on: 4/6/2009 7:05:19 AM | Views : 458

Dear All,
 I am using the custom membership provider example from asp.net website.
I am having a retrieve password  page where I want the user to enter an email address and wanted the
password to be sent to him by email.
string username = Membership.GetUserNameByEmail(txtEmail.txt);
MembershipUser mu = Membership.GetUser(username);
oldPassword = mu.GetPassword(); //Then the code to send the password through email.
When I debug the username is retrieved correctly but the getpassword() method gives the error 
object reference not set to an instance of the object. "mu is null". 
Can someone point out my mistake please?
Thanks in advance,
Prasad.

...

Go to the complete details ...