Since ASP.NET Core

Now, it's different. No default route is created by default and no 404 error is returned by default when a route is not matched. The routing system is added on the HTTP pipeline as a middleware.

On Windows, IIS will only redirect to kestrel or any other web server using the aspnetcore module on the IIS mapping handlers.

If a URL requested by a client matches an existing route in the route collection, the RouteAsync method of its handler is called, and if there's an exception handling the request, the next route pattern is tried instead of directly returning a 404 error.

Get ASP.NET Core MVC 2.0 Cookbook 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.