System.Web.Security.MembershipUser.ChangePasswordQuestionAndAnswer Is encrypting PasswordAnswer

You can post your problem related to Microsoft Visual Studio Projects here. We will try our best to help you out.
Post Reply
Johnson
Posts: 18
Joined: Sat Feb 18, 2017 9:10 am

System.Web.Security.MembershipUser.ChangePasswordQuestionAndAnswer Is encrypting PasswordAnswer

Post by Johnson » Tue Mar 07, 2017 8:54 am

I’ve been using the System.Web.Security.MembershipUser.ChangePasswordQuestionAndAnswer method for several years and all has been fine. Now today something strange started happening. When I pass in the 3 parameters (password, passwordQuestion and passwordAnswer), the passwordAnswer appears to be encrypted when I view it in the sql aspnet_Membership table. For example, if I run this line of code:

user.ChangePasswordQuestionAndAnswer(“myPassword”, “myPet”, “dog”);

These are the values stored in the aspnet_Membership table:
Password = “myPassword”
PasswordQuestion = “myPet”
PasswordAnswer = “n51Do4TY8pYTAzyenYDe9d46Kjyc8oEbYbf4CRMzlE8=”

But I’m expecting PasswordAnswer to be “dog”.
Can anyone shed some light on what might be happening here?

everytime I used this in the past, PasswordAndwer would be "dog" in the aspnet_Membership table.

Additionaly, in the web.config file the SqlProvider passwordFormat attribute has always been set to "Encrypted" so this has not changed. Something else must have changed to cuase the PasswordAnswer to start encrypting.

Thank you.

Post Reply