Thursday, February 18, 2010

Disabling Configuration Inheritance For ASP.NET Child Applications

I had a HttpModule for my parent website and I had a virtual directory under the parent website. When I tried to access the virtual directory, I got the following error.

Could not load file or assembly 'XXXXXXXX' or one of its dependencies. The system cannot find the file specified.

Solution

Include the following in the parent website web.config file to exclude any of the config settings so that the settings doesn't get inherited from the parent website to the child virtual directory.

<location path="." inheritInChildApplications="false">
[any other config settings]
</location>

No comments:

Post a Comment