本文介绍了MiniProfiler找不到jquery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我一直在使用MiniProfiler来衡量网站性能.当我从1.9版升级到2.0版时,它停止工作.我将名称空间从MvcMiniProfiler更改为StackExchange.Profiling.但是,当我加载页面时,提琴手显示以下请求存在404错误:

I've been using the MiniProfiler to measure site performance. When I upgraded from version 1.9 to 2.0, it stopped working. I changed the namespace from MvcMiniProfiler to StackExchange.Profiling. But when I load a page, fiddler shows there is a 404 error for the following request:

GET/local/mini-profiler-resources/jquery.1.7.1.js?v=tNlJPuyuHLy/d5LQjyDuRbWKa0weCpmO3xkO6MH4TtA= HTTP/1.1

GET /local/mini-profiler-resources/jquery.1.7.1.js?v=tNlJPuyuHLy/d5LQjyDuRbWKa0weCpmO3xkO6MH4TtA= HTTP/1.1

这可防止结果显示在页面中.

This prevents the results from being rendered in the page.

要使MiniProfiler 1.9版正常工作,我必须在Web.Config文件中包含以下条目(如):

To get the 1.9 version of MiniProfiler to work, I had to have the following entries in the Web.Config file (as described in this post):

  <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与配置文件中包含的配置文件一起运行,而排除了配置文件,这两种方法均无效.

I have tried to get MiniProfiler 2.0 to run with those included in the config file and with them excluded, neither way worked.

这正在我的IIS Express的开发计算机上运行.

This is running on my development machine in IIS Express.

我的应用是使用Forms安全性的WebForms应用.

My app is a WebForms app that uses Forms security.

我该如何解决?

推荐答案

这似乎是一个常见问题,只需将其添加到web.config中就可以了

It looks like this is a common problem, just add this to the web.config and it should be fine

将runAllManagedModulesForAllRequests设置为false的运行MiniProfiler

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

这篇关于MiniProfiler找不到jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 19:30