When you use the Membership service is ASP.NET 2.0 and the SqlMembershipProvider, you can only create members when the password contains at least one non-alphanumeric character. This is sometimes confusing to the users, and there are other ways to make them choose a strong password.
If you want to change this setting for the provider, you might think of using the MinRequiredNonAlphaNumericCharacters property. This is a read-only property, so there’s no luck there. You have to resort to the web.config or machine.config and alter the definition of the existing AspNetSqlMembershipProvider or create a new provider definition. That’s when it happens. Normally you will just take the property of the provider you want to change, camel-case it and put it into the config like so:
For the MinRequiredNonAlphanumericCharacters you would expect this attribute to be minRequiredNonAlphanumericCharacters. There seems to be a typo, as Reflector reveals the following fragment in the provider’s Initialize method. Take note of the pink ‘a’, that should have been capitalized.
this._MinRequiredPasswordLength = SecUtility.GetIntValue(config, “minRequiredPasswordLength”, 7, false, 0x80);
this._MinRequiredNonalphanumericCharacters = SecUtility.GetIntValue(config, “minRequiredNonalphanumericCharacters“, 1, true, 0x80);
this._PasswordStrengthRegularExpression = config[“passwordStrengthRegularExpression”];