Before MVC, a URL represented a physical .ASPX
file, but MVC added an abstraction layer to map URLs with controllers and actions. The goal was to call methods calling resources in a REST way, rather than calling pages.
In an MVC framework, regardless of the technology used, a routing system maps an incoming URL with a URL route pattern corresponding to an action's controller. A routing system doesn't work with physical files.
All the URL patterns are stored in an object called routecollection
.
If there's no match, a HTTP 404 error is returned.
The routing system was linked with IIS.
HTTP.sys
, the listener process in IIS, redirects to the UrlRouting
module, which redirects to the ASP.NET and the ASP.NET MVC pipeline.