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

Solution 1:

You're guess that an IIS handler is probably grabbing the request prior to MVC is likely correct.

Assuming IIS 7: http://technet.microsoft.com/en-us/library/cc770990(v=ws.10).aspx

You need to edit the .html handler in IIS to use ASP.NET.

You can find it in the website properties under the home directory tab in app configuration in the mappings section in II6.

Something along the lines of (version may be different): C:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll is what you need to handle the .html files.

Solution 2:

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>