Saturday, October 8, 2022

What is HTTP Handler and HTTP Module.

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.
    • For example: if you want to change how jpg files are processed, you will implement custom HTTP handler versus if you want to execute additional logic during processing of the request, you will implement a custom HTTP module. There is always only one HTTP handler for a specific request but there can be multiple HTTP modules.


    • If you want your functionality to only be executed once per Http Request, you should use an HttpModule.



No comments:

Post a Comment