middleware pipeline
The ordered chain of middleware every HTTP request passes through on the way in, and in reverse on the way out.
In more detail
Outer middleware sees failures and responses from inner code, which is why the exception handler goes first. Map endpoints after the cross-cutting middleware they depend on.
Related terms
- middleware — Code that sits between an incoming request and the handler that answers it, doing a shared job such as logging, authentication or rate limiting.
- exception handler middleware — ASP.NET Core middleware, added with app.UseExceptionHandler(), that catches unhandled exceptions from later components and returns a safe error response.
- endpoint — An address that a program sends requests to, such as a web path like /health or a network socket.
Taught in
- The ASP.NET Core Middleware Pipeline — Modern .NET Core, C# & Enterprise Microservices
- Global Exception Handling and Problem Details — Modern .NET Core, C# & Enterprise Microservices
- API Documentation UI with Scalar — Modern .NET Core, C# & Enterprise Microservices