Export (0) Print
Expand All

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:
virtual property bool RequiresQuestionAndAnswer {
	bool get () override;
}

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.

Show:
© 2014 Microsoft