Disable Web Config inheritance for Virtual Application

If you have a lot of virtual applications under your webiste
You can Disable the main website's web config so it won't inherit to your Virtual Application.
It's quite simple about how to disable this Web Config's inheritance. All you have to do is simply modify your Web config with a <location> tag. The <location> tag can prevent inheritance for part of the web config.

<?xml version="1.0"?>
<configuration>
<configSections>
....
</configSections>
<location path="." inheritInChildApplications="false">
<appSettings>
....
</appSettings>
<connectionStrings/>
<system.web>
....
</system.web>
<system.codedom>
....
</system.codedom>
<system.webServer>
....
</system.webServer>
</location>
<runtime>
....
</runtime>
</configuration

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

I get a database timeout expired error on my ASP.NET application. What can I do?

I get the following error when my ASP.NET application connects to the MS SQL server:...

How do I get my ASP.net application to display non-English language

ASP.net allows the developer to encode the page using character sets other than unicode.  If your...

I get a configuration error when I execute my application in a subdirectory. How do I resolve this?

This error may occur if the application is being run out of a subfolder and the subfolder is not...

Why can I still access my ASP.NET pages even though I disabled anonymous access to my directory?

After disabling anonymous access in the permission manager in the control panel, ASP.net pages...

After I configure the custom error setting in the control panel, I still get the generic error page?

Custom error setting is a web server setting that sets your website Error Pages, but you can...