How to prevent web.config inheritance in ASP.NET

Deploying under a subdomain causes web.config to inherit from the root one. In some cases you need to prevent that. A simple way is to wrap what section you need to prevent, let’s say for example system.web:

<location path="." inheritInChildApplications="false">

          <system.web>     ....     </system.web>

</location>
Advertisements