Routing middleware
Routing middleware is an ASP.NET Core request-pipeline component that matches incoming requests to endpoints and stores the selected endpoint for subsequent processing.
ASP.NET Core in Action, 3e
UseRouting is an ASP.NET Core extension method that adds routing middleware to a web application's request pipeline.
- How it is used
- Selects request endpoints within ASP.NET Core middleware pipelines for minimal APIs and Razor Pages.
- How deep it goes
- Explains endpoint selection, execution, automatic registration, and pipeline ordering through working configurations.
- Examples
- Uses a Hello World minimal API, a Razor Pages pipeline, and a file-based Products/View route.
- What you can do after
- Operate/configure routing middleware with UseRouting(), register endpoints, and position middleware around endpoint selection.
Read how ASP.NET Core in Action, 3e explains routing middleware →
Pro ASP.NET Core 7, Tenth Edition
Routing middleware is an ASP.NET Core request-pipeline component that matches requests to endpoints and stores the selected endpoint for later processing.
- How it is used
- Matches request paths to endpoints in the ASP.NET Core pipeline so a selected endpoint can handle the response.
- How deep it goes
- Works through registration, path patterns, route values, and endpoint inspection; describes route scoring without detailing its algorithm.
- Examples
- Uses `/routing`, `/capital/uk`, three-segment paths, and a middleware response reporting the selected endpoint.
- What you can do after
- Build it from scratch with `MapGet`, read captured route values, and inspect the selected endpoint from middleware.
Read how Pro ASP.NET Core 7, Tenth Edition explains routing middleware →
Related concepts
- request pipelineconfigures · A request pipeline is an ordered sequence of processing components through which HTTP requests and their responses pass in a web application.
- routinguses · Routing is the process of directing an item, request, or task to a destination or processing path according to relevant rules or characteristics.
- handleruses · A handler is a software routine or component invoked to process an event, request, message, or other input.
- endpointproduces · An endpoint is an addressable interface of a service through which clients access a resource or invoke an operation, typically via a network request.
- middlewarepart of · Middleware is software that mediates communication or processing between components, often by intercepting, transforming, or coordinating operations in a pipeline.
- Razor Pagesuses · Razor Pages is an ASP.NET Core page-focused programming model in which independently addressable pages combine Razor markup with request-handling logic.
Questions about routing middleware
What is routing middleware?
Routing middleware is an ASP.NET Core request-pipeline component that matches incoming requests to endpoints and stores the selected endpoint for subsequent processing.
Which Manning books explain routing middleware?
ASP.NET Core in Action, 3e and Pro ASP.NET Core 7, Tenth Edition.
What is routing middleware part of?
Routing middleware is part of middleware. Middleware is software that mediates communication or processing between components, often by intercepting, transforming, or coordinating operations in a pipeline.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

