© Adam Freeman 2016

ADAM FREEMAN, Pro ASP.NET Core MVC , 10.1007/978-1-4842-0397-2_15

15. URL Routing

Adam Freeman

(1)Milton Keynes MK6 3PA, UK

Early versions of ASP.NET assumed that there was a direct relationship between requested URLs and the files on the server hard disk. The job of the server was to receive the request from the browser and deliver the output from the corresponding file. This approach worked just fine for Web Forms, where each ASPX page is both a file and a self-contained response to a request.

It doesn’t make sense for an MVC application, where requests are processed by action methods in controller classes and there is no one-to-one correlation to the files on the disk.

To handle MVC URLs, the ASP.NET platform uses the routing ...

Get Pro ASP.NET Core MVC, Sixth 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.