views:

118

answers:

3

We are using the ASP.NET Membership Provider for managing the users in our application.

All was fine until when we had a new requirement. Users should be able to select multiple security questions and give answers to the same.

While recovering the password, the user will be presented with one of the security questions and if the user answers correctly the password will be sent.

By default ASP.NET Membership provides only one security question and one security answer. Is there is any way to make it use multiple ones?

A: 

Why are you storing your password in a decryptable format?

Malfist
He may have just phrased that clumsily. The out-of-the-box membership provider will *reset* a password, not *resend* it. I agree that sending the original password would be a security hole.
Craig Stuntz
sorry if i did mentioned it otherwise.I am storing the password in hashed format only.
kans
Are they salted too?
Malfist
A: 

You could customize the default ASP.NET Membership provider to your specific requirements by subclassing it.

Nathan Taylor
I think he's asking how to do just that. :)
Craig Stuntz
A: 

Hey,

Creating your own custom ASP.NET membership provider would be the key. Additionally, you'd have to create a custom template for the .NET login controls that use the password Q's, so that you can display multiple question/answer sections.

You may have to set the membership provider to not use the password question/answer, but programmably manage it yourself. By default, it uses that single Q/A to manage security; but since you need multiple, it may be easier to use custom logic to manage this.

EDIT: the only other thing I can think of is have two provider definitions, each with their own password question/answer, so that you are effectively storing two records in the database per user. The thing is that the UI controls won't work with that approach, so you would need to custom build the UI.

HTH.

Brian
Brian,This is exactly what i was trying to avoid.Already i had deviated much from ASP.NET Membership, that if i am also do that i am using the provider only to do SP Insert/Update :)Was trying to see if there is another option available to have multiple questions/answers rather than the default one each.Thanks for looking into the question
kans
Sure, but there is not out of the box; you have to deviate. the only other thing I can think of is added to the post above.
Brian