Abhishek Mathur
Abhishek Mathur

Reputation: 316

How to stop web.config inheritance from the Child application

I know that we can stop inheritance of the web.config files from the root web.config file like this:

This attribute below used in the root web.config file will prevent an application from passing its configuration as a default to child applications.

<!-- Root web.config file -->
<?xml version="1.0"?>
<configuration>
  <location path="." inheritInChildApplications="false"> 
    <system.web>
      <compilation debug="false" />
      <!-- other configuration attributes -->
    </system.web> 
  </location>
</configuration>

But i just want to know that is there any attribute or somethiing by which i can do this by my child application's web.config.

Upvotes: 1

Views: 4652

Answers (1)

Jarek Kardas
Jarek Kardas

Reputation: 8455

Not much you can do unless you're on IIS7, in which case you can use configuration locking as described here on www.iis.net

Upvotes: 2

Related Questions