我一直在使用 MiniProfiler 来测量站点性能。当我从 1.9 版升级到 2.0 版时,它停止了工作。我将命名空间从 MvcMiniProfiler 更改为 StackExchange.Profiling。但是当我加载页面时,提琴手显示以下请求出现 404 错误:
GET /local/mini-profiler-resources/jquery.1.7.1.js?v=tNlJPuyuHLy/d5LQjyDuRbWKa0weCpmO3xkO6MH4TtA= HTTP/1.1
这可以防止结果在页面中呈现。
为了让 1.9 版的 MiniProfiler 工作,我必须在 Web.Config 文件中有以下条目(如本文所述):
<system.webServer>
<handlers>
<add name="UrlRoutingModule1" path="mini-profiler*.js" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
<add name="UrlRoutingModule2" path="mini-profiler*.css" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
<add name="UrlRoutingModule3" path="mini-profiler*.tmpl" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>
我试图让 MiniProfiler 2.0 与配置文件中包含的那些一起运行,并且将它们排除在外,但这两种方法都不起作用。
这是在我的 IIS Express 开发机器上运行的。
我的应用程序是使用表单安全性的 WebForms 应用程序。
我该如何解决这个问题?