I am attempting to use the location element in the web.config file of an ASP.NET 2.0 application to prevent the inheritance of configured elements such as HTTP handlers in child applications. I can get this to successfully work on my development machine, but when deployed to production this isn't working, and child apps are inheriting configuration from the parent application. The location element is used to surround the system.web element, and here is the the declaration I'm using for it:-
<location path="." inheritInChildApplications="false">
Both machines are running IIS6 on Windows Server 2003, but the main difference in configuration is that on the production machine, the parent app is the root app in the IIS web site, whereas on my development machine the parent was a child app of the web site. Thinking that this may have been the cause, I created a new web site on my development machine with the parent app as the root to mimic the configuration in production, but I am still not seeing the problem on my development machine, and inheritance of config elements is suppressed as expected.
Does anyone have any advice to help me to get this to work, or know of any limitations or gotchas when using the location element?