Disable configuration inheritance in ASP.NET

Disable configuration inheritance in ASP.NET

Configuration inheritance is a very good feature of ASP.NET. It allows you to set configuration settings in the Web.config file of a parent application and have it automatically be applied to all of its child applications.

But sometimes you do not want the child applications to inherit the configuration from its parent application, so you are going to need to disable configuration inheritance in ASP.NET child applications.

Please find below the code that would prevent the child application from inherit the configuration from the parent application.

<location inheritinchildapplications="false" path=".">
  <system.web>
    <!--System.web Configurations goes here -->
  </system.web>   
</location>

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *