MiniProfiler找不到jquery的

本文描述了从 MiniProfiler 1.9 升级到 2.0 版本后出现的问题,包括加载页面时出现 404 错误,并提供了可能的解决方案。

我一直在使用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><addname="UrlRoutingModule1"path="mini-profiler*.js"verb="*"type="System.Web.Routing.UrlRoutingModule"resourceType="Unspecified"preCondition="integratedMode"/><addname="UrlRoutingModule2"path="mini-profiler*.css"verb="*"type="System.Web.Routing.UrlRoutingModule"resourceType="Unspecified"preCondition="integratedMode"/><addname="UrlRoutingModule3"path="mini-profiler*.tmpl"verb="*"type="System.Web.Routing.UrlRoutingModule"resourceType="Unspecified"preCondition="integratedMode"/></handlers></system.webServer>

我曾试图得到MiniProfiler 2.0运行包含在配置文件中,他们排除,既没有办法工作。

这是我的机器上运行在IIS Express。

我的应用程序是一个的WebForms的应用程序,使用表单的安全性。

我该如何解决这个问题?

看起来这是一个常见的​​问题,只需添加到web.config,它应该是罚款

运行与设置为false runAllManagedModulesForAllRequests的MiniProfiler的

<system.webServer>
...
  <handlers><addname="MiniProfiler"path="mini-profiler-resources/*"verb="*"type="System.Web.Routing.UrlRoutingModule"resourceType="Unspecified"preCondition="integratedMode"/></handlers></system.webServer>

转载于:https://www.cnblogs.com/zwb7926/p/3140738.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值