14

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)

scaryman
  • 1,880
  • 1
  • 19
  • 30
  • perhaps also relevant, visual studio 2012 AND it's running in the azure emulator. – scaryman Jul 25 '12 at 21:41
  • Interesting question. I honestly don't know the answer without looking / testing. – Marc Gravell Jul 25 '12 at 21:54
  • It's not a huge priority for us so we've moved on, i'm going to take a stab at it during our next iteration. Usually miniprofiler is so pain free to set up! It just doesn't make sense to me that the route would show up as registered, yet requests return 404s. – scaryman Jul 26 '12 at 14:39

1 Answers1

35

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>
Community
  • 1
  • 1
Bennett Dill
  • 2,875
  • 4
  • 41
  • 39
  • Wow! I finally had time to dig into it this afternoon. I re-enabled it, and it worked! I dug around, found that exact article, went here to post it and you beat me by 16 hours! runAllManagedModulesForAllRequests=false was indeed the culprit. – scaryman Aug 13 '12 at 20:25