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

Was this answer helpful?

 Print this Article

Also Read

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...

How do I setup custom error for my ASP.net application?

ASP.net has its own built-in error handling. To set up custom error handling for your ASP.net...

ASP.NET Validation is not working on your server.

...

How did I send email from ASP.net ?

You have to use System.Web.Mail namespace Below is the code snippets : using System.Web.Mail;...

In one of the applications I want to host, there must be a write privilage to ASPNET account so that it will be able to create folders, so is that possible ?

Yes, that is possible. In fact you can set the read and write permission yourself. Our control...