Routing

This chapter talks about routing, that is, the process by which ASP.NET Core translates a user request into an MVC controller and action. This can be a complex process because subtle changes in a request can lead to different endpoints (controller/action pairs) being called. Several aspects need to be taken into account: the protocol (HTTP or HTTPS), whether the user issuing the request is authenticated or not, the HTTP verbs, the path of the request, the query string, and the actual types of the path and query string parameter values.

Routing also defines what happens when a route is not matched, that is, the catch-all route, and it can be used for complex situations where we need to define custom route constraints.

ASP.NET Core ...

Get Modern Web Development with ASP.NET Core 3 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.