Error message:
The minimum password length is 7, which must contain the following non-alphanumeric characters: 1
Solution:
The above message is mainly generated when you create a user. It is also generated when you create a user using the Asp.net website management tool.
There are two main methods to change the above rules:
1. All sites are changed.
Find the machine. config file.
< Membership >
< Providers >
< Add Name = "Aspnetsqlmembershipprovider"
Type = "System. Web. Security. sqlmembershipprovider, system. Web, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a"
Connectionstringname = "Localsqlserver"
Enablepasswordretrieval = "False"
Enablepasswordreset = "True"
Requiresquestionandanswer = "True"
Applicationname = "/"
Requiresuniqueemail = "False"
Passwordformat = "Hashed"
Maxinvalidpasswordattempts = "5"
Minrequiredpasswordlength = "7"
Minrequirednonalphanumericcharacters = "1"
Passwordattemptwindow = "10"
Passwordstrengthregularexpression = "" />
</ Providers >
</ Membership >
There are two attributes, one is minrequiredpasswordlengthIndicates the longest password. The default value is 7.The other isMinrequirednonalphanumericcharacters. The default value is 1, which means there must be at least one non-letter character. You only need to change it to 0.
2. If you only want to modify the Web. config value for a website, it will be OK.
Modify the precedingCodeInsert it under <system. Web>.
If you want to change the password rule to "at least 6 Characters without special characters", as follows:
(Note: you must add <remove name = "aspnetsqlmembershipprovider"/>. Otherwise, an error message indicating "aspnetsqlmembershipprovider has been added" is displayed)
< Membership >
< Providers >
<Remove name = "aspnetsqlmembershipprovider"/>
< Add Name = "Aspnetsqlmembershipprovider"
Type = "System. Web. Security. sqlmembershipprovider, system. Web, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a"
Connectionstringname = "Localsqlserver"
Enablepasswordretrieval = "False"
Enablepasswordreset = "True"
Requiresquestionandanswer = "True"
Applicationname = "/"
Requiresuniqueemail = "False"
Passwordformat = "Hashed"
Maxinvalidpasswordattempts = "5"
Minrequiredpasswordlength = "6"
Minrequirednonalphanumericcharacters = "0"
Passwordattemptwindow = "10"
Passwordstrengthregularexpression = "" />
</ Providers >
</ Membership >