I've been searching for the cause of bug occuring when adding a custom httpModule using the web.config for a while now (I've already posted this on this list).

I've gone into the code and the only thing I can image that occurs is that the web.config of one virtual directory is configured twice for the same AppDomain.

The section in the web.config that causes this problem looks like this:

<httpModules>
<add name="TrustedAuthenticationModule" type="TrustedSecurity.TrustedAuthenticationModule, TrustedSecurity" />
</httpModules>


I found some strange code in 2 lines that are indirectly related to the configuration, in host.h the function void Configure(String *VirtualPath, String *PhysicalPath, HostFactory *Factory, int HostKey) contains these lines:

physicalPath = physicalPath->Substring(0, VirtualPath->get_Length() - 1);
virtualPath = virtualPath->Substring(0, VirtualPath->get_Length() - 1);

shouldn't these be:

physicalPath = physicalPath->Substring(0, physicalPath->get_Length() - 1);
virtualPath = virtualPath->Substring(0, virtualPath->get_Length() - 1);

(the last line ofcourse has no effect, but maybe it's better to get the code as clean as possible).

Back to my problem, I can create a workaround for it, but I'm really curious wether or not the web.config file is handled twice, this would be a serious bug I think. Anybody else?

_________________________________________________________________
MSN Search, for accurate results! http://search.msn.nl



Reply via email to