相关疑难解决方法(0)

MiniProfiler找不到jquery

我一直在使用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应用程序.

我该如何解决这个问题?

mvc-mini-profiler

24
推荐指数
1
解决办法
3977
查看次数

mvc4资源路由上的miniprofiler返回404

我正在尝试从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)

c# asp.net-mvc mvc-mini-profiler asp.net-mvc-4

14
推荐指数
1
解决办法
3475
查看次数