我正在尝试从nuget和mvc4安装设置miniprofiler,miniprofiler.mvc3和miniprofiler.ef,目标是.net 4.0
它注册了route / mini-profiler-resources / {resourceName},当我使用routedebugger时,这条路线会出现。但是,对这条路线的所有请求都以404s的形式返回。我运气不好因为我正在运行mvc4或者这有点奇怪吗?
<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" />
来自routedebugger(抱歉格式化想象它是一张桌子!)
All Routes
Matches Current Request Url Defaults Constraints DataTokens
False mini-profiler-resources/{filename} controller = MiniProfilerHandler, action = ProcessRequest controller = MiniProfilerHandler, action = ProcessRequest (null)
答案 0 :(得分:35)
万一你还没有解决这个问题以及其他任何人登陆这里......我遇到了类似的问题(特别是/mini-profiler-resources/jquery.1.7.1.js?v=6cJT7lsVkH6SxAlFpQstk1/AgtUwMUApXN3pviVvaRE= )并找到了以下相关主题,它解决了我的问题。
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>