Question

I am using the Membership.Provider for security in my MVC Application. I have a forgot password page that asks for your username, and then gives you the secret question on file. My question is how to a check the secret answer against what is on file. I can't seem to find any method that does that besides

Membership.Provider.ResetPassword(userName, secretAnswer) 

which basically approves anything I type in.

Was it helpful?

Solution

There's a setting in the web.config you have to set to tell the Membership Provider to use the secret question.

It's requiresQuestionAndAnswer="true" where you set up the membership provider.

Edit: In your comment requiresQuestionAndAnswer is set to "false" - it should be "true"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top