Prevent web.config inheritance

If you add a new ASP.NET web site to a virtual directory/application under an existing ASP.NET web site, then you’ll probably have some problems with web.config inheritance.

Even if the webapp is physically separate, just being in a virtual directory located within another webapp will result in many of the settings being inherited and messing up your sub directory webapp.

The key is adding the the location element to the web.config and setting InheritInChildApplications to false.

Code Snippet
  1. <location inheritInChildApplications="false">

Surround the sections of your top-level web application’s web.config file.

The method to resolve these issues can be found over at Rick Strohs' blog entry “IIS/ASP.NET Settings and Virtual Directory Inheritance“.

Bookmark and Share

Comments are closed
Loading...
load detailsview filter filter filter