与runAllManagedModulesForAllRequests运行MiniProfiler设置为false [英] Running MiniProfiler with runAllManagedModulesForAllRequests set to false

查看:202
本文介绍了与runAllManagedModulesForAllRequests运行MiniProfiler设置为false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

近日,我们从V1.7升级到MiniProfiler 2.0.1版,从那时起,我们一直没能因为当它试图获取它的资源,它,而不是得到一个404使用它在我们的网站MVC3

Recently we upgraded to MiniProfiler version 2.0.1 from v1.7, and since then we have not been able to use it in our MVC3 website because when it tries to get its resources, it instead gets a 404.

一个例子资源调用:
  /mini-profiler-resources/includes.js?v=tNlJPuyuHLy/d5LQjyDuRbWKa0weCpmO3xkO6MH4TtA =

An example resource call is: /mini-profiler-resources/includes.js?v=tNlJPuyuHLy/d5LQjyDuRbWKa0weCpmO3xkO6MH4TtA=

在四周寻找,大多数人都暗示简单的设置 runAllManagedModulesForAllRequests 应设置为真正。对于笑声,我继续将其设置为true,并且是它的工作。 但是,这不是一个可以接受的答案。

In searching around, most people are suggesting that simply setting runAllManagedModulesForAllRequests should be set to true. For giggles, I went ahead and set it to true, and yes it did work. But that is not an acceptable answer.

我怎能 runAllManagedModulesForAllRequests = FALSE 并仍然使用MiniProfiler V2?

How can I keep runAllManagedModulesForAllRequests=false and still use MiniProfiler v2?

推荐答案

我有同样的问题 - 所请求的资源使用静​​态的文件扩展名(如的.js ),因此IIS希望使用其静态文件处理程序来处理它们。

I had the same issue - the resources being requested use "static" file extensions (such as .js) and therefore IIS wants to handle them using its static file handler.

幸运的是,所有的MiniProfiler资源都要求与路径迷你探查资源,所以你可以添加以下到你的的web.config

Luckily all of the MiniProfiler resources are requested with the path mini-profiler-resources, so you can add the following to your web.config:

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

入门上述指示IIS,对于迷你探查资源路径中的任何请求,通过ASP.NET路由。

The entry above instructs IIS that any request for the mini-profiler-resources path to be routed through ASP.NET.

这篇关于与runAllManagedModulesForAllRequests运行MiniProfiler设置为false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆