.net - What is the purpose of configSections? -


i've done little research , ran across this: http://msdn.microsoft.com/en-us/library/ms228245.aspx

so if i'm understanding correctly, doing including .dlls use within project, like:

<add assembly="system.web.extensions, version=1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35"/>

and i'm guessing difference if configsections way can set parameters creating 'name' later in webconfig (or other config) xml element. correct, or missing something?

also, noticed can remove configsections website's web.config , run fine, following configsections:

<configsections>     <sectiongroup name="system.web.extensions" type="system.web.configuration.systemwebextensionssectiongroup, system.web.extensions, version=1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35">         <sectiongroup name="scripting" type="system.web.configuration.scriptingsectiongroup, system.web.extensions, version=1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35">             <section name="scriptresourcehandler" type="system.web.configuration.scriptingscriptresourcehandlersection, system.web.extensions, version=1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" allowdefinition="machinetoapplication"/>             <sectiongroup name="webservices" type="system.web.configuration.scriptingwebservicessectiongroup, system.web.extensions, version=1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35">                 <section name="jsonserialization" type="system.web.configuration.scriptingjsonserializationsection, system.web.extensions, version=1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" allowdefinition="everywhere"/>                 <section name="profileservice" type="system.web.configuration.scriptingprofileservicesection, system.web.extensions, version=1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" allowdefinition="machinetoapplication"/>                 <section name="authenticationservice" type="system.web.configuration.scriptingauthenticationservicesection, system.web.extensions, version=1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" allowdefinition="machinetoapplication"/>             </sectiongroup>         </sectiongroup>     </sectiongroup> </configsections> 

i reading somewhere , have still run because configsections defined default in machine.config. why define again in website's web.config? assume override machine.config custom settings? there way me determine default contents of machine.config file is?

you right. asp.net configuration sections defined within machine.config. it's hierarchy each configuration file overrides parent. can find machine.config , root web.config file under following directory.

c:\windows\microsoft.net\framework\v2.0.50727\config 

Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -