ASP.NET Web.config Inheritance

By default, virtual directories inherit the web.config of their parent web sites.  That is why "clear" is so important.  There is a way to stop it though (and treat each virtual directory like a separate app): inheritInChildApplications
 
"Set InheritInChildApplications to false to prevent settings that are specific to a certain location (such as the root directory of a Web site) from being inherited by applications that exist in subdirectories.

The following example shows how to use this attribute in a configuration file to specify that the settings defined in the location element for the root of a Web site should not be inherited by child applications:

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

http://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation.inheritinchildapplications.aspx

Advertisements
This entry was posted in Software Development. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s