I have encountered an interesting problem recently. I have a HttpModule, which i have added in modules runAllManagedModulesForAllRequests="true" node , by hand.
The main site collection is at http: //collection:81 .
If i access the site on the 81 port, the module works just fine. I can attach the visual studio debugger to the wsp process, and all works well.
The farm, however has an alternate access mappings set for the collection:81 the next alternate mappings: http: //mappedname , for example
The http module does not work there, it is like it isn't loaded.
I tried even to attach the vs 2010 debugger to the wsp process, but it doesn't want the enter in the preinit function of the http module, like it doesn't even exist.
I have tried to redo the situation in our test environments.
I set an alternate mappings, set the dns alias, and all worked well in the test environment. The only difference is that in the test environment i tried to add programaticaly the web.config modification on feature activated receiver, which worked on adding it, but did not manage to remove it on feature deactivation.
So, i am a little bit confused about this situation. Any suggestion would be appreciated,