Request Pipeline for ASP.NET Cores
The ASP.NET Core request pipeline is the ordered chain of middleware that every HTTP request passes through before reaching an endpoint and again on the way out. Dependency injection supplies services to middleware and endpoints, and routing matches the URL and method to the handler that should run.
Stage: Foundations · Part of the ASP.NET Core roadmap · Last reviewed 19 November 2026
What to learn in Request Pipeline
- Order middleware correctly, such as routing, authentication and authorization
- Write a custom middleware component using the next delegate
- Register services as singleton, scoped or transient
- Map endpoints with route templates and constraints
- Bind route values, query strings and request bodies to parameters
Request Pipeline interview questions
Why does middleware order matter in ASP.NET Core?
Each middleware runs in the order it is added and decides whether to call the next one. Authentication must run before authorization, and exception handling should come first to catch later errors. A wrong order can make security checks run after the endpoint or never run.
What is the difference between scoped and transient services?
A transient service creates a new instance every time it is requested. A scoped service creates one instance per request scope, shared by everything in that HTTP request. Singletons live for the whole app. DbContext is registered as scoped for this reason.
Where Request Pipeline fits in the ASP.NET Core roadmap
Request Pipeline belongs to the Foundations stage (beginner level), which takes about 28 hours. The framework.
Other units in this stage
Back to the full ASP.NET Core roadmap