Skip HttpModule Use?

  • Thread starter Thread starter poi
  • Start date Start date
P

poi

I have an HttpModule defined in my web.config, sometimes I want to use
it and sometimes I don't. Is there a way to declare whether I need it
or not in my code-behind?

Thanks.
 
poi said:
I have an HttpModule defined in my web.config, sometimes I want to use
it and sometimes I don't. Is there a way to declare whether I need it
or not in my code-behind?

Which code-behind? An HttpModule is called for every request. It doesn't
depend on the codebehind of any given page.

Have your HttpModule decide whether or not it is needed, or else partition
your pages into those which need it and those which do not. Put these
partitions in separate directory trees and use a separate web.config in each
tree.
 
Back
Top