Differences between Httphandlers and HttpModules are as follows: –
Handlers and modules helps you inject pre-processing logic before the ASP.NET request reaches the website.
For instance, before your request reaches any resource you would like to check if the user has been authenticated or not.
Httphandlers is an extension based processor. In other words the pre-processing logic is invoked depending on file extensions.
Httpmodule is an event based processor. In other words ASP.NET emits lot of event like BeginRequest, AuthenticateRequest etc, we can write logic in those events using Httpmodule.
View the following video on optimistic locking: –
View other ASP.NET interview questions
Get author’s more ASP.NET interview questions