1

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> 
vishal
  • 11
  • 1

2 Answers2

0

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.

Dave
  • 649
  • 5
  • 13
0

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)

Community
  • 1
  • 1
Dave
  • 649
  • 5
  • 13