ActiveDirectoryMembershipProvider.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 ActiveDirectoryMembershipProvider instance to initialize.
- config
A NameValueCollection containing the names and values of the configuration options for the membership provider.
| Exception type | Condition |
|---|---|
|
config is a null reference (Nothing in Visual Basic). | |
|
The applicationName attribute specified in the application configuration exceeds 256 characters. - or - The connectionStringName attribute is empty or does not exist in the application configuration. - or - The connection string specified in the connectionStringName attribute in the application configuration file is empty or does not exist. - or - The connectionProtection attribute is set to a value other than SignAndSeal or None in the application configuration file. - or - The connectionUsername attribute is specified in the application configuration file but its value is empty. - or - The connectionPassword attribute is specified in the application configuration file but its value is empty. - or - Either the connectionUsername attribute or the connectionPassword attribute is specified in the application configuration file, but not both. - or - The clientSearchTimeout attribute is specified but is not a positive integer. - or - The serverSearchTimeout attribute is specified but is not a positive integer. - or - The enableSearchMethods attribute is specified, but is not a Boolean value. - or - The requiresUniqueEmail attribute is specified, but is not a Boolean value. - or - The enablePasswordReset attribute is specified, but is not a Boolean value. - or - The requiresQuestionAndAnswer attribute is specified, but is not a Boolean value. - or - The minRequiredPasswordLength attribute is specified and it is either negative or greater than 128. - or - The minRequiredNonalphanumericCharacters attribute is specified and it is either negative or greater than 128. - or - The regular expression specified in the passwordStrengthRegularExpression attribute in the application configuration file is not a valid regular expression - or - The attributeMapUsername attribute is specified, but it is an empty string. - or - The connectionString attribute does not begin with "LDAP". - or - The connection string specified in the connectionString attribute is invalid. - or - The connection string in the connectionString attribute specifies a server-less bind. - or - The ActiveDirectoryMembershipProvider could not establish a connection with the domain or directory server. - or - The connectionProtection attribute is set to SignAndSeal, but neither an SSL nor a signed and sealed connection can be established with the server. - or - The connectionProtection attribute is set to None but the connectionUsername and connectionPassword attributes are not set. - or - The connectionProtection attribute is set to SignAndSeal but the ActiveDirectoryMembershipProvider could not establish an SSL connection with an ADAM server. - or - The connectionString attribute specifies either the global catalog (GC) or an SSL global catalog port. - or - The connectionString attribute specifies an Active Directory server or domain, but the ActiveDirectoryMembershipProvider could not retrieve the default naming context for the domain. - or - The connectionString attribute specifies an Active Directory server or domain, but the ActiveDirectoryMembershipProvider could not retrieve the default users container. - or - The connectionString attribute specifies an ADAM server, but it does not specify an application partition or container. - or - The connectionString attribute specifies an application partition or container, but the specified container does not exist. - or - The connectionString attribute specifies a container that is not allowed to contain user instances. An attribute mapping is specified but its value was empty. - or - An attribute mapping is specified twice. - or - An attribute mapping is specified but the attribute does not exist on the user instance. - or - An attribute mapping is specified but the directory attribute is not of the correct data type. - or - An attribute mapping is specified but the directory attribute is multi-valued. - or - The attributeMapUserName attribute is specified but was mapped to neither the - or - The attributeMapUserName attribute is specified but was not mapped to the - or - The enablePasswordReset attribute is true and the requiresQuestionAndAnswer attribute is false in the application configuration file. - or - The maxInvalidPasswordAttempts attribute was specified but is not a non-zero positive integer. - or - The passwordAttemptWindow attribute was specified but is not a non-zero positive integer. - or - The passwordAnswerAttemptLockoutDuration attribute was specified but is not a non-zero positive integer. - or - The enablePasswordReset attribute is true and any of the attributeMapFailedPasswordAnswerCount, attributeMapFailedPasswordAnswerTime, and attributeMapFailedPasswordAnswerLockoutTime attributes are empty. - or - The requiresQuestionAndAnswer attribute is true but either the attributeMapPasswordQuestion or the attributeMapPasswordAnswer attribute is empty. - or - An attribute specified in the application configuration file is not valid. | |
|
The application is running in a hosted environment and the AspNetHostingPermissionLevel is set to Minimal. | |
|
An error occurred while querying the directory. |