SimpleMembershipProvider.RequiresQuestionAndAnswer Property

Gets a value that indicates whether the membership provider requires that the user answer a security question for password reset and retrieval.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

public override bool RequiresQuestionAndAnswer { get; }

Property Value

Type: System.Boolean
true if a security-question answer is required; otherwise, false. The default is true.

This property indicates whether the answer to a security question must be supplied in order for users to retrieve a password using the GetPassword(String, String) method, or to reset their password using the ResetPassword(String, String) method.

If the SimpleMembershipProvider class has been initialized using a call to the InitializeDatabaseConnection() method, this property returns false. However, if the InitializeDatabaseConnection() method has not been called, and if you have configured your site to use the standard ASP.NET membership provider, this property is passed through to the standard membership provider. When you use the standard membership provider, the value is set in the application configuration file (Web.config). For more information, see the SimpleMembershipProvider class overview.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.