epo*_*ter 24 mvc-mini-profiler
我一直在使用MiniProfiler来测量网站性能.当我从1.9版升级到2.0版时,它停止了工作.我将命名空间从MvcMiniProfiler更改为StackExchange.Profiling.但是当我加载页面时,fiddler显示以下请求有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>
Run Code Online (Sandbox Code Playgroud)
我试图让MiniProfiler 2.0与配置文件中包含的那些一起运行并排除它们,但两种方式都没有用.
这是在IIS Express中的我的开发机器上运行的.
我的应用程序是一个使用Forms安全性的WebForms应用程序.
我该如何解决这个问题?
Ben*_*son 26
看起来这是一个常见问题,只需将其添加到web.config即可
运行MiniProfiler,并将runAllManagedModulesForAllRequests设置为false
<system.webServer>
...
<handlers>
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3977 次 |
| 最近记录: |