J
John
Hi
I am trying to set a new password using the following code;
Dim u As MembershipUser = Membership.GetUser(UserName)
Dim OldPassword As String
OldPassword = u.GetPassword
If u.ChangePassword(OldPassword, Password) Then
ChangePassword = True
end if
The problem is that it gives me the following error on the line OldPassword
= u.GetPassword;
System.NotSupportedException: This Membership Provider has not been
configured to support password retrieval.
at System.Web.Security.SqlMembershipProvider.GetPassword(String username,
String passwordAnswer)
at System.Web.Security.MembershipUser.GetPassword()
What is the problem and how can I fix it? Ideally I don't want to have to
answer the security question.
Thanks
Regards
I am trying to set a new password using the following code;
Dim u As MembershipUser = Membership.GetUser(UserName)
Dim OldPassword As String
OldPassword = u.GetPassword
If u.ChangePassword(OldPassword, Password) Then
ChangePassword = True
end if
The problem is that it gives me the following error on the line OldPassword
= u.GetPassword;
System.NotSupportedException: This Membership Provider has not been
configured to support password retrieval.
at System.Web.Security.SqlMembershipProvider.GetPassword(String username,
String passwordAnswer)
at System.Web.Security.MembershipUser.GetPassword()
What is the problem and how can I fix it? Ideally I don't want to have to
answer the security question.
Thanks
Regards