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)
Syntax
'Declaration
Public Overrides ReadOnly Property RequiresQuestionAndAnswer As Boolean
Get
'Usage
Dim instance As SimpleMembershipProvider
Dim value As Boolean
value = instance.RequiresQuestionAndAnswer
public override bool RequiresQuestionAndAnswer { get; }
public:
virtual property bool RequiresQuestionAndAnswer {
bool get () override;
}
abstract RequiresQuestionAndAnswer : bool
override RequiresQuestionAndAnswer : bool
override function get RequiresQuestionAndAnswer () : boolean
Property Value
Type: System.Boolean
true if a security-question answer is required; otherwise, false. The default is true.
Remarks
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.