MemberShip, role, and WebPart parameters in the web. config file

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.