SYSK 145: Preventing Configuration Setting Inheritance in Web Apps

If you have a website that contains nested ASP.NET web applications, by default, the settings in the root website’s configuration file inherit downward through all of the ASP.NET applications and subdirectories of the site (see for more information). 


One way to enhance application performance, maintain high reliability, and simplify administration is to restrict inheritance of configuration settings. 

The attributes frequently used to achieve that are: allowOverride, lockAttributes, lockAllAttributesExcept, lockAllElementsExcept, lockItem and lockElements (see for more information).


But did you know that you can also use a new (in .NET 2.0) attribute inheritInChildApplications to lock an entire section of settings?  Here is how you’d use it:


<location inheritInChildApplications=”false”>


       <!—Your settings here will not be inherited -->