Well, it depends on the type of information you store in the Web.config file.
Some settings (and I believe httpModules are part of that) apply to an application, and therefore need to reside in an application folder.
Other settings (Keys of node type Add under <appSettings> for example) can be overridden in a Web.Config folder below the application root and without marking the folder as a separate application. If you add the following code to a Web.Config file in a folder that is not marked as a VD, you can still retrieve the info on that folder's level:
Code:
<configuration>
<appSettings>
<add key="MyKey" value="Bla Bla Bla" />
</appSettings>
</configuration>
Even if MyKey has been defined at a higher level, this code:
System.Configuration.ConfigurationSettings.AppSett ings.Get("MyKey");
will give you Bla Bla Bla from the sub folder.
I always thought that only elements defined as MachineToApplication and MachineOnly (defined in your Machine.config file) could not be overridden in config files located deeper in the hierarchy. However, the httpModules does not have these attributes defined, so right now I am a bit stumped as to what you can and what you cannot override in Web.Config files.....
So, unfortunately, I do not know the exact answer; some settings work; others don't. I browsed some of my bookmarks for articles about this, but haven't found anything useful yet.....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.