if I register httpmodule in web.config it work but if I put my web.config out side the root folder it is not working.
<httpmodule>
<add name="HeaderModule" type="AddHeader.HeaderModule,AddHeader"/>
</httpModules>
if I register httpmodule in web.config it work but if I put my web.config out side the root folder it is not working.
<httpmodule>
<add name="HeaderModule" type="AddHeader.HeaderModule,AddHeader"/>
</httpModules>
While the following solution works it may not solve your problem. Since you can have multiple web.configs, why not create a web.config in your root whose sole purpose is to register the httpModule. All the other non-httpModule web.config stuff can be put in other web.config.
Another solution would be to programmaitcally register the httpModule at runtime.
Programmatically register HttpModules at runtime (link from stack overflow, so don't ding me)