1 <membership defaultProvider = "AspNetSqlProvider">
2 <providers>
3 <add connectionStringName = "name of an existing database connection string in the configuration file"
4 applicationName = "/"
5 description = ""
6 minRequiredPasswordLength = "6"
7 minRequiredNonalphanumericCharacters = "0"
8 requiresUniqueEmail = "false"
9 enablePasswordRetrieval = "false"
10 enablePasswordReset = "false"
11 requiresQuestionAndAnswer = "false"
12 passwordFormat = "Hashed"
13 name = "AspNetSqlProvider"
14 type = "System. Web. Security. SqlMembershipProvider"/>
15 </providers>
16 </membership>
DefaultProvider: default data provider
ConnectionStringName: key of the database connection string Node
ApplicationName: name of the program that uses this membership
Description: description
MinRequiredPasswordLength: Minimum number of passwords
MinRequiredNonalphanumericCharacters: How many special characters must be contained
RequiresUniqueEmail: whether the email must be unique during registration.
EnablePasswordRetrieval: Allow password retrieval
EnablePasswordReset: allow changing the password
RequiresQuestionAndAnswer: Do I have to enter a password when registering? My Questions and answers
PasswordFormat: Password Encryption Method
Name: name
Type: namespace of the class
Note that this configuration section not only breaks through the user registration method that we have always considered to be not in line with China's national conditions (more than 7 characters must contain a special character)
At the same time, we can specify the data provider. Here we specify the SQL Server.
Next, we will post several other changes to the data provider.
1 <webParts>
2 <personalization defaultProvider = "AspNetSqlProvider">
3 <providers>
4 <add connectionStringName = "AppConnectionString"
5 applicationName = "/" name = "AspNetSqlProvider" type = "System. Web. UI. WebControls. WebParts. SqlPersonalizationProvider"/>
6 </providers>
7 <authorization>
8 <allow users = "*" verbs = "enterSharedScope"/>
9 </authorization>
10 </personalization>
11 </webParts>
12 <roleManager defaprovider provider = "AspNetSqlProvider">
13 <providers>
14 <add connectionStringName = "AppConnectionString" applicationName = "/" description = "" name = "AspNetSqlProvider"
15 type = "System. Web. Security. SqlRoleProvider"/>
16 </providers>
17 </roleManager>
Note that the above two sections are extracted from the lecture about WebPart by Mr. Liu, which roughly means:
The default data provider in the WEBPart section is AspNetSqlProvider.
Then we can see an allow users = "*" verbs = "enterSharedScope"
This statement allows anyone to operate the part page in a shared range.
The following roleManage refers to our role data provider. Like above, it comes to the ADD configuration section below.