I was greeted rather abruptly today by an error message that resembled the following:
The module 'XXX' is already in the application and cannot be added again.
This surprised me as I hadn't made any changes to my web.config file's <httpModules /> section. In fact the module in question is only in my web.config file one time.
I have a web configuration file editor that I had written that updates config files and it automatically adds the <httpModules /> section if necessary, wiring up the httpModule in question. As it turns out, I had inadvertently updated the web.config in my root website which was causing the module to be loaded globally. Removing the erroneous information from my root web.config file fixed the problem straightaway.