Running MiniProfiler with runAllManagedModulesForAllRequests set to false

I had the same issue - the resources being requested use "static" file extensions (such as .js) and therefore IIS wants to handle them using its static file handler.

Luckily all of the MiniProfiler resources are requested with the path mini-profiler-resources, so you can add the following to your web.config:

<system.webServer>
  ...
  <handlers>
    <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
  </handlers>
</system.webServer>

The entry above instructs IIS that any request for the mini-profiler-resources path to be routed through ASP.NET.