MySQL Connector/Net |
MySQLMembershipProvider..::.EnablePasswordRetrieval Property |
MySQLMembershipProvider Class Example See Also Send Feedback |
Indicates whether the membership provider is configured to allow users to retrieve
their passwords.
Namespace:
MySql.Web.Security
Assembly:
MySql.Web (in MySql.Web.dll) Version: 6.2.2.0
Syntax
C# |
---|
public override bool EnablePasswordRetrieval { get; } |
Visual Basic (Declaration) |
---|
Public Overrides ReadOnly Property EnablePasswordRetrieval As Boolean |
Visual C++ |
---|
public: virtual property bool EnablePasswordRetrieval { bool get () override; } |
Field Value
true if the membership provider is configured to support password retrieval; otherwise, false. The default is false.Remarks
If the system is configured to use hashed passwords, then retrieval is not possible.
If the user attempts to initialize the provider with hashed passwords and enable password retrieval
set to true then a ProviderException is thrown.
Examples
The following example shows the membership element being used in an applications web.config file.
CopyC#
<membership defaultProvider="MySQLMembershipProvider"> <providers> <add name="MySqlMembershipProvider" type="MySql.Web.Security.MySQLMembershipProvider" connectionStringName="LocalMySqlServer" enablePasswordRetrieval="true" enablePasswordReset="false" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Encrypted" maxInvalidPasswordAttempts="3" passwordAttemptWindow="20" minRequiredNonAlphanumericCharacters="1" minRequiredPasswordLength="11" applicationName="MyApplication" /> </providers> </membership>