SqlMembershipProvider.Initialize Method
Assembly: System.Web (in system.web.dll)
public void Initialize ( String name, NameValueCollection config )
public override function Initialize ( name : String, config : NameValueCollection )
Not applicable.
Parameters
- name
The name of the SqlMembershipProvider instance to initialize.
- config
A NameValueCollection that contains the names and values of configuration options for the membership provider.
| Exception type | Condition |
|---|---|
|
config is a null reference (Nothing in Visual Basic). | |
|
The enablePasswordRetrieval, enablePasswordReset, requiresQuestionAndAnswer, or requiresUniqueEmail attribute is set to a value other than a Boolean. - or - The maxInvalidPasswordAttempts or the passwordAttemptWindow attribute is set to a value other than a positive integer. - or - The minRequiredPasswordLength attribute is set to a value other than a positive integer, or the value is greater than 128. - or - The minRequiredNonalphanumericCharacters attribute is set to a value other than zero or a positive integer, or the value is greater than 128. - or - The value for the passwordStrengthRegularExpression attribute is not a valid regular expression. - or - The applicationName attribute is set to a value that is greater than 256 characters. - or - The passwordFormat attribute specified in the application configuration file is an invalid MembershipPasswordFormat enumeration. - or - The passwordFormat attribute is set to Hashed and the enablePasswordRetrieval attribute is set to true in the application configuration. - or - The passwordFormat attribute is set to Encrypted and the machineKey configuration element specifies AutoGenerate for the decryptionKey attribute. - or - The connectionStringName attribute is empty or does not exist in the application configuration. - or - The value of the connection string for the connectionStringName attribute value is empty, or the specified connectionStringName does not exist in the application configuration file. - or - The value for the commandTimeout attribute is set to a value other than zero or a positive integer. - or - The application configuration file for this SqlMembershipProvider instance contains an unrecognized attribute. | |
|
The current trust level is less than Low. | |
|
The provider has already been initialized prior to the current call to the Initialize method. |