After ASP. NET 2.0, you have a set of Logon credential and authority. (Please refer to the article "Certificate and authority of ASP. NET (motion picture description )])
The password set by the parameter must be a combination of English and numbers, and a non-English special character must be provided, with at least seven digits. This type of password can be used to increase the security of the password, avoid someone else using the bot program to guess your password. However, if the internal system wants to be simpler, you can change its rules by setting web. config.
Setting, in machine. config, there is such a setting
<Membership> <providers> <Add name = "aspnetsqlmembershipprovider" type = "system. web. security. sqlmembershipprovider, system. web, version = 2.0.0.0, culture = neutral, publickeytoken = login "connectionstringname =" localsqlserver "Login =" false "enablepasswordreset =" true "Login =" true "applicationname ="/"requiresuniqueemail =" false "passwordformat =" hashed "Login = "5" minrequiredpasswordlength = "7" minrequirednonalphanumericcharacters = "1" passwordattemptwindow = "10" passwordstrengthregularexpression = ""/> </providers> </Membership>
The following content is taken into consideration (or according to msdn)
| Namespace |
Description |
| Applicationname |
Get or set the name of the application. |
| Enablepasswordreset |
Indicates whether the current staff information provider is set to allow users to reset the password. |
| Enablepasswordretrieval |
Indicates whether the current staff information provider is set to allow users to retrieve the secret. |
| Hashalgorithmtype |
ShowAlgorithmUsed for authentication. |
| Maxinvalidpasswordattempts |
Previous attempts to obtain invalid password or password-based answers allowed by qualified staff users. |
| Minrequirednonalphanumericcharacters |
Obtains the minimum number of special characters that must exist in a valid secret. |
| Minrequiredpasswordlength |
Obtain the minimum length required by the secret. |
| Passwordattemptwindow |
The maximum number of minutes allowed for invalid password or password-based answers before obtaining the user defined as an employee. |
| Passwordstrengthregularexpression |
Obtains the formula used to calculate the password. |
| Provider |
Obtain the token of the application program as an employee resource provider. |
| Providers |
Obtains the set of membership providers for ASP. NET applications. |
| Requiresquestionandanswer |
Gets a value, indicating whether the user is required to answer the password question by setting the employee information provider, so that the user can reset and retrieve the password. |
| Userisonlinetimewindow |
Specify the number of minutes after the user's last active date/time stamp, and the user will be on the hour. |
If you need to modify all web cases on the machine, you can directly modify this case. However, it is better for me to modify the suggestions for others.
If you want to modify a single platform or a single web application, you can add your own modifications to the Web. config of the platform or web application as follows:
<Membership> <providers> <remove name = "aspnetsqlmembershipprovider"/> <Add name = "aspnetsqlmembershipprovider" type = "system. web. security. sqlmembershipprovider, system. web, version = 2.0.0.0, culture = neutral, publickeytoken = login "connectionstringname =" localsqlserver "Login =" false "enablepasswordreset =" true "Login =" true "applicationname ="/"requiresuniqueemail =" false "passwordformat =" hashed "Login = "5" minrequiredpasswordlength = "6" minrequirednonalphanumericcharacters = "0" passwordattemptwindow = "10" passwordstrengthregularexpression = ""/> </providers> </Membership>
(The false setting must be changed to at least 6 characters. You only need to mix English letters and numbers without entering special characters)
(Please note that you must add <remove name = "aspnetsqlmembershipprovider"/>. Otherwise, there will be an added warning message for aspnetsqlmembershipprovider !!)
Exam:
Http://msdn.microsoft.com/zh-tw/library/system.web.security.membership_properties (vs.80). aspx
Http://www.zzsky.cn/build/content/693.htm