HTTP modules and HTTP handlers

As opposed to HttpHandlers and HttpModules, middleware is created and used programmatically without a config file. We are now agnostic from IIS and System.Web.

Let's look at a few things about HttpHandlers and HttpModules:

  • An HttpModule runs for each request before arriving at the handler that generates the response, and/or after it generates the response
  • A Handler handles the request and generates the response for a given file extension

Get ASP.NET Core MVC 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.