ASP.NET Core: Middleware
1h 1mIntermediate2025-05-06
Authors

Christian Wenz
Web Pioneer, Technology Specialist, Entrepreneur
Course details
In ASP.NET Core, the HTTP pipeline is built from middleware—components that see every request and response and decide how to act upon them, and whether to forward each one to the next component in the pipeline. In this course, learn what middleware is and how to write middleware components of your own to enhance ASP.NET Core web applications. Instructor Christian Wenz also details inline and external middlewares, mapping them to HTTP requests, and fine-tuning the order in which they run.
Learning objectives
Explain the structure and function of the ASP.NET Core pipeline.
Develop a custom ASP.NET Core middleware straight in Program.cs.
Describe the various options how to create a middleware class in ASP.NET Core.
Learning objectives
Explain the structure and function of the ASP.NET Core pipeline.
Develop a custom ASP.NET Core middleware straight in Program.cs.
Describe the various options how to create a middleware class in ASP.NET Core.
Skills covered
ASP.NET CoreBack-End Web DevelopmentFull-Stack Web DevelopmentFront-End Web DevelopmentSoftware Development ToolsWeb DevelopmentMicrosoftSoftware DevelopmentOne-Off
Concepts
0. Introduction
- 01 - Building custom middleware in ASP.NET Core
- 02 - What you need to know
1. Getting Started with Middlewares in ASP.NET Core
- 03 - The ASP.NET Core pipeline
- 04 - Built-in ASP.NET Core middlewares
- 05 - Creating a middleware with Run()
- 06 - Creating a middleware with Use()
- 07 - Route-specific middlewares with Map()
- 08 - Middlewares with MapWhen() and UseWhen()
- 09 - Challenge - Implement a middleware
- 10 - Solution - Implement a middleware
2. More ASP.NET Core Middleware Features
- 11 - Creating a middleware class
- 12 - Implementing and registering a middleware
- 13 - Adding an extension method
- 14 - Creating a middleware through a factory
- 15 - Testing a middleware
Conclusion
- 16 - Enhance your ASP.NET Core skills