Skip HttpModule Use?

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.
 
J

John Saunders

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top