ASP.NET Interview question :- What are HttpHandler and HttpModules and how do they differ?
HttpModule is event based processor. ASP.NET engine emits out lot of events as the request traverses over the request pipeline. Just to name some events beginrequest, authorizerequest, authenticaterequest etc. By using HttpModule you can write logic in these events. These logic get executed as the events fire and before the request reaches IIS server.
So a short answer for the above .NET interview question would be HttpHandler is a extension based processor while HttpModule is a event base processor. Both of them help to inject pre-processing logic before the ASP.NET request reaches the IIS server.
See my Top ASP.NET Interview questions and answers