Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

miniprofiler on mvc4 resources route returns 404

I'm trying to set up miniprofiler, miniprofiler.mvc3 and miniprofiler.ef from nuget and on an mvc4 installation, targeting .net 4.0

It registered the route /mini-profiler-resources/{resourceName}, and this route shows up in when i use routedebugger. But, all requests to this route come back as 404s. Am I out of luck because I'm running mvc4 or is this something weird?

<package id="MiniProfiler" version="2.0.2" targetFramework="net40" /> <package id="MiniProfiler.EF" version="2.0.3" targetFramework="net40" /> <package id="MiniProfiler.MVC3" version="2.0.2" targetFramework="net40" />

From routedebugger (sorry about the formatting imagine it's a table!)

All Routes Matches Current Request Url Defaults Constraints DataTokens False mini-profiler-resources/{filename} controller = MiniProfilerHandler, action = ProcessRequest controller = MiniProfilerHandler, action = ProcessRequest (null)

like image 410
scaryman Avatar asked Jul 25 '12 21:07

scaryman


1 Answers

Just in case you haven't resolved this yet and for anyone else landing here... I had a similar issue (specifically /mini-profiler-resources/jquery.1.7.1.js?v=6cJT7lsVkH6SxAlFpQstk1/AgtUwMUApXN3pviVvaRE=) and found the following related thread, which fixed my problem.

Running MiniProfiler with runAllManagedModulesForAllRequests set to false

<system.webServer>
...
  <handlers>
    <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
  </handlers>
</system.webServer>
like image 200
Bennett Dill Avatar answered Sep 19 '22 21:09

Bennett Dill