Hi
I setup a IIS application from within an existing application.
Will the parents web.config be inherited or is that something I have to set explicitly?
Hi
I setup a IIS application from within an existing application.
Will the parents web.config be inherited or is that something I have to set explicitly?
Yes it will without setting anything explicitly, and I don't know any way to prevent it.
However many configuration sections will allow you to clear data inherited from parent files.
E.g.
<appSettings>
<clear/>
<add key=...>
</appSettings>
<connectionStrings>
<clear/>
<add ... />
</connectionStrings>
the child inherits the parent's web.config.
also, when a new web.config is created in the child, the child's web.config settings override the same settings in the parent's web.config.
You can also use the Remove tag to get rid of things you don't want or put everything in a location and tell it not to inherit.
<remove name="FooBar" />
<location path="." inheritInChildApplications="false">
<system.web>
...
</system.web>
</location>