Migrating HTTP modules to middleware

In this recipe, we will learn how to transform an ASP.NET HTTP module in ASP.NET Core middleware.

Before anything, let's brush up on what an HTTP handler is. An HTTP module can add a treatment to an incoming request from the ASP.NET/IIS pipeline before it arrives at the handler, and/or add a treatment to the generated response. It can even transform or generate its own response.

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.