Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
What is the Purpose of <sectiongroup> <section> in web.config ?

Why we need that...? i did read the article http://msdn.microsoft.com/en-us/library/ms228114.aspx[^]

But why we need that...what if it is not included...any real time examples ?

Sample:
XML
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                </sectionGroup>
            </sectionGroup>
        </sectionGroup



Thanks
Posted
Updated 26-Jun-12 2:04am
v2

1 solution

<<sectiongroup>> Element[^]
-Defines a namespace for configuration sections.

Declaring a section group creates a container tag for configuration sections and ensures that there are no naming conflicts with configuration sections defined by someone else. You can nest <sectiongroup> elements within each other.

section Element for configSections[^]
-Defines an association between a configuration section handler and a configuration element.

A section element associates a configuration section handler with a configuration element or section. This is required because ASP.NET makes no presumptions about how to handle settings within a configuration file. Instead, ASP.NET delegates the processing of configuration data to configuration section handlers.
Each section element identifies a configuration section or element and the associated class that is derived from ConfigurationSection that handles the configuration section or element.
The section elements can be logically grouped in sectionGroup elements for organization and to help avoid naming conflicts. The section and sectionGroup elements are contained in the configSections element.
 
Share this answer
 
v2
Comments
Sandeep Mewara 26-Jun-12 14:46pm    
Good answer. 5!
Prasad_Kulkarni 26-Jun-12 23:39pm    
Thank you Sandeep!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900