Prevent ASP.NET web.config inheritance, and inheritInChildApplications attribute
Since I've changed my top level blog engine, I've had some troubles with YAF, the forum engine I'm using for my Remote Control software.
The forum I'm using is in a child directory, which is a child application defined in IIS as an other application. The BlogEngine.NET disables the use of Sessions, and YAF requires sessions to be enabled, plus BlogEngine.NET adds some custom HTTP handlers, which incidentally are not known but the forum application. This is quite a mess, and to be able to get both applications running without fine tuning each one to work with the other, I had to use the little known attribute inheritInChildApplications.
This attribute prevents an application from passing its configuration as a default to child applications. Using this attribute is a little tricky, and has to be used this way :
[code:xml]
<!-- Root web.config file -->
<?xml version="1.0"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.web>
<compilation debug="false" />
<!-- other configuration attributes -->
</system.web>
</location>
</configuration>
[/code]
This way, any child application defined below this application will not use the current configuration. There's some mystery around the inheritInChildApplications attribute; it is not defined in the dotnetconfig.xsd file and it still is a rather helpful configuration option...