Professional ASP.NET MVC 4
by Jon Galloway, Phil Haack, Brad Wilson, K. Scott Allen, Scott Hanselman
Under the Hood: How Routes Tie Your URL to an Action
This section provides a peek under the hood to get a detailed understanding of how these pieces tie together. This will give you a better picture of where the dividing line is between Routing and MVC.
One common misconception is that Routing is just a feature of ASP.NET MVC. During early previews of ASP.NET MVC 1.0 this was true, but it quickly became apparent that Routing was a useful feature in its own right beyond ASP.NET MVC. For example, the ASP.NET Dynamic Data team was also interested in using Routing. At that point, Routing became a more general-purpose feature that had neither internal knowledge of nor a dependency on MVC.
To better understand how Routing fits into the ASP.NET request pipeline, let's look at the steps involved in routing a request.
The High-Level Request Routing Pipeline
The Routing pipeline consists of the following high-level steps when a request is handled by ASP.NET:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access