Web.config file inheritage and cascading

  • Thread starter Thread starter King Coffee
  • Start date Start date
K

King Coffee

Hello,

I have an IIS application directory within anther application directory.
Currently, I'll double defining all XML contain in both web.config files.
My question is: do I need to fine all web.config attributes in the child
application that are common in the parent application web.config
file?

Thank you,

King
 
Hello,

I have an IIS application directory within anther  application directory.
Currently, I'll double defining all XML contain in both web.config files.
My question is: do I need to fine all web.config attributes in the child
application that are common in the parent application web.config
file?

Thank you,

King

Settings from the root web.config file are inherited by the child
application's web.config file unless you specify different settings.
There are two commands you can use to remove specific element or all
elements from the section: <remove> and <clear>. For example, this
would remove all modules:

<httpModules>
<clear/>
</httpModules>

or to remove specific element from the AppSettings

<appSettings>
<remove key="MyName1"/>
</appSettings>

http://msdn.microsoft.com/en-us/library/9b9dh535.aspx
http://msdn.microsoft.com/en-us/library/bya7fh0a.aspx

Hope this helps
 
Back
Top