tags:

views:

150

answers:

2

I am having an ASP.net Membership I need to verify the User Question and Answer.

I dont need to use Password Because its Hashed we cannot validate it

MembershipUser msUser = Membership.GetUser("Rasel");

thanks, Lalithambigai

+1  A: 

Ask the user a question and compare their answer with their previously provided answer?

However, a hashed password doesn't prevent you from verifying it. Simply hash the user's response and compare the hash with the stored password hash. Note that the hashing scheme may contain salt, or initialization characters to prevent dictionary attacks.

A: 

If you are storing the Question/Answer in the membership provider (which it sounds like you are) then you pass the answer to the msUser.ResetPassword method. If the answer is incorrect it will throw a MembershipPasswordException.

TonyB