HTTP handler is the process that runs in response to a request made to an ASP.NET Web application. HTTP modules let you examine incoming and outgoing requests and take action based on the request.
To explain HTTP Modules and HTTP Handlers, HTTP module and HTTP handler are used by MVC to inject pre-processing logic in the request chain. HTTP Handlers are extension based pre-processor whereas HTTP Module are event based preprocessor.
An HTTP module is an assembly that is called on every request to an application. It's a part of the HTTP request and response pipeline. Even the ASP.NET engine uses HttpModule to perform certain operations (which are outside our interests here).
Is there a good way to exclude certain pages from using a HTTP module?
I have an application that uses a custom HTTP module to validate a session. The HTTPModule is set up like this in web config:
<system.web>
<!-- ... -->
<httpModules>
<add name="SessionValidationModule"
type="SessionValidationModule, SomeNamespace" />
</httpModules>
</system.web>
To exclude the module from the page, I tried doing this (without success):
<location path="ToBeExcluded">
<system.web>
<!-- ... -->
<httpModules>
<remove name="SessionValidationModule" />
</httpModules>
</system.web>
</location>
Any thoughts?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With