System.Web.Security.ActiveDirectoryMembershipProvider.RequiresQuestionAndAnswer Property

Gets a value indicating whether the membership provider is configured to require a password question and answer when creating a user.

Syntax

public override bool RequiresQuestionAndAnswer { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The ActiveDirectoryMembershipProvider.RequiresQuestionAndAnswer property is set in your application's configuration file using the requiresQuestionAndAnswer attribute of the membership element. If the property is not set in the application's configuration file, the ActiveDirectoryMembershipProvider.RequiresQuestionAndAnswer property is set to the default value of false.

When the requiresQuestionAndAnswer attribute is set to true, you must also set these additional attributes.

  • attributeMapPasswordQuestion and attributeMapPasswordAnswer must be mapped to attributes in the Active Directory schema.

If the above criteria are not met, a System.Configuration.Provider.ProviderException is thrown at initialization.

Note:

You can require a password question and answer when creating a user, but set the ActiveDirectoryMembershipProvider.EnablePasswordReset property to false to prevent users from changing their passwords using the System.Web.Security.ActiveDirectoryMembershipProvider class.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0