ASP. NET miscellaneous-everything starts from web. config (2) (detailed description of ConfigSections-on)

Source: Internet
Author: User
Tags configuration settings

 

ConfigSections Structure


--------------------------------------------------------------------------------

First, let's review the ConfigSections structure and its sub-nodes as follows:

1: <configSections>
2: <sectionGroup name = "system. web. extensions "type =" System. web. configuration. systemWebExtensionsSectionGroup, System. web. extensions, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31BF3856AD364E35 ">
3: <sectionGroup name = "scripting" type = "System. Web. Configuration. ScriptingSectionGroup, System. Web. Extensions, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31BF3856AD364E35">
4: <section name = "scriptResourceHandler" type = "System. Web. Configuration. ScriptingScriptResourceHandlerSection, System. Web. Extensions, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31BF3856AD364E35"
5: requirePermission = "false" allowDefinition = "MachineToApplication"/>
6: <sectionGroup name = "webServices" type = "System. Web. Configuration. ScriptingWebServicesSectionGroup, System. Web. Extensions, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31BF3856AD364E35">
7: <section name = "jsonSerialization" type = "System. Web. Configuration. ScriptingJsonSerializationSection, System. Web. Extensions, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31BF3856AD364E35"
8: requirePermission = "false" allowDefinition = "Everywhere"/>
9: <section name = "profileService" type = "System. Web. Configuration. ScriptingProfileServiceSection, System. Web. Extensions, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31BF3856AD364E35"
10: requirePermission = "false" allowDefinition = "MachineToApplication"/>
11: <section name = "authenticationService" type = "System. Web. Configuration. ScriptingAuthenticationServiceSection, System. Web. Extensions, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31BF3856AD364E35"
12: requirePermission = "false" allowDefinition = "MachineToApplication"/>
13: <section name = "roleService" type = "System. Web. Configuration. ScriptingRoleServiceSection, System. Web. Extensions, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31BF3856AD364E35"
14: requirePermission = "false" allowDefinition = "MachineToApplication"/>
15: </sectionGroup>
16: </sectionGroup>
17: </sectionGroup>
18: </configSections>


ConfigSectins attributes and subnodes


--------------------------------------------------------------------------------

Attribute
:

None.

Subnode description:

Node name

Function Description

SectionGroup

Define the configuration section handler and ConfigurationSection.

Section

Define the configuration section handler and ConfigurationElement.

It is not difficult to find that ConfigSectings mainly contains two subnodes: SectiongGroup and Section. The following describes the attributes of these two nodes:

1. sectionGroup attribute description

 

Attribute name

Function Description

Name

SpecifyTypeThe name of the configuration section or element associated with the configuration section handler specified by the property.

Type

Specify the name of the configuration section handler class used to perform the following operations:NameConfiguration settings in the specified section or element in the property. Use the following format:

Type =" Fully qualified class name , Assembly file name , Version , Culture , Public key token ",The definition must match the Assembly reference.

The Assembly file must be in the same application directory as the Web. config file that defines it.

The SectionGroup can still contain multiple sectiongroups and sections.

 

 

2. section attributes

Attribute name

Function Description

Name

Specifies the name of the configuration section or element associated with the configuration section handler specified in the type attribute.

Type

Specify the name of the configuration section handler class used to perform the following operations: Process configuration settings in the section or element specified in the name attribute. The format is the same as the type format in the preceding sectionGroup attribute.

RequirePermission

Access permission information is required to specify whether to obtain the relevant configuration. Optional Boolean attribute.

RestartOnExternalChanges

Specifies whether to restart the application when the configuration data in this section is changed. This attribute is optional and does not apply to ASP. NET applications.

Related Article

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.