ASP.NET MVC Routing – add .html extension to routes

You have to force all request through the ASP.NET pipeline, and you can do that by adding only this single line to the web.config of your application:

<system.webServer>
  <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>

Leave a Comment