Modify Strong Password rules in ASP. net2.0 built-in member management. The minimum password length is 7, which must contain the following non-alphanumeric characters: 1
ASP. NET web site administration tool
When you create a user in the Security Settings wizard, the following error occurs:
The minimum password length is 7, which must contain the following non-alphanumeric characters: 1.
(Password length minimum: 7. non-alphanumeric characters required: 1 .)
The above messages are mainly generated when you create a user, and will also be generated when you create a user using Asp.net web site manage.
The main reason is that the password does not meet the requirements. To change the above rules, there are two main types:
1. All sites are changed.
Find the machine. config file.
There are two attributes: minrequiredpasswordlength, which indicates the minimum number of characters that must be entered when a valid password is created. The default value is 7, and minrequirednonalphanumericcharacters, it indicates the minimum number of special non-alphanumeric characters that must be entered to create a valid password. The default value is 1. You only need to change it to 0.
2. Only the current site settings are available. You only need to modify the value of Web. config (tested and feasible)
The modification method is as follows:CodeIt will be inserted under <system. Web>.
Note: you must add the <remove name = "aspnetsqlmembershipprovider"/> item. Otherwise, the following error may occur: "The item" aspnetsqlmembershipprovider "has been added. "Error message.
Why remove it to the "aspnetsqlmembershiopprovider" and then add it? Don't understand...
<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>