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. |
|