liveBook · Manning

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.

How 2 Manning books explain it

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

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.