Diagnosing 404 errors on IIS 7 and ASP.NET MVC




- April 20, 2015

Rest of the Story:

Are you running in IIS7 integrated mode?
Classic mode of IIS7 does not automatically map extensionless URLs to ASP.NET (much like IIS6).
Also make sure your Web.config <system.webServer> tag is configured correctly.
i.e.

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
 
On my workstation windows 7, 64 bit I had set my app pool to classic and 
added a "Wildcard Script Map" 
to C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll (32bit dll). 
The end result was my 
web.confi webServer section looked like
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true" />
        <handlers>
            <add name="_wildcard 32" path="*" verb="*" modules="IsapiModule" 
 scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" 
 resourceType="Unspecified" requireAccess="None" 
 preCondition="classicMode,runtimeVersionv4.0,bitness32" />
        </handlers>
  </system.webServer>