【问题标题】:Getting error with MiniProfiler: System.Web.Routing.UrlRoutingModule does not implement IHttpHandlerFactoryMiniProfiler 出错:System.Web.Routing.UrlRoutingModule 未实现 IHttpHandlerFactory
【发布时间】:2012-08-29 09:31:01
【问题描述】:

我正在使用 MiniProfiler 来分析我的 ASP.NET 4 Webform 应用程序。在 localhost 中它工作正常,但是当我部署到 IIS7 时,我收到以下错误:

System.Web.Routing.UrlRoutingModule does not implement IHttpHandlerFactory or IHttpHandler

这是给我错误的 web.config 行

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

你知道在这种情况下我应该怎么做吗?

【问题讨论】:

  • 我得到了同样的错误,但我在 IIS6 下运行
  • 我在 Visual Studio Cassini 服务器中确实遇到了同样的错误。不知道如何修复它
  • 您能否查看您的路径以查看它是否有任何点 (.)。以下路径不起作用:localhost:<port>/MyApplication.Admin.

标签: asp.net iis-7 webforms mvc-mini-profiler


【解决方案1】:

最后,我最终使用了以下配置。这可能有点矫枉过正,一般不推荐,但我解决了我的问题

<module runAllManagedModulesForAllRequests="true"/>

【讨论】:

  • @LDJ:请确保您的应用程序路径不包含“。”特点。例如 localhost:1234/my-application.admin 将不起作用
【解决方案2】:
 <handlers>
    <remove name="UrlRoutingModule-4.0"/>
    <add  name="UrlRoutingModule-4.0" path="*" verb="*" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
  </handlers>

【讨论】:

  • 您想对您的答案添加一些评论,以解释哪些方面可以解决原始问题吗?
猜你喜欢
  • 2017-02-28
  • 1970-01-01
  • 2018-10-31
  • 1970-01-01
  • 2012-02-11
  • 1970-01-01
  • 1970-01-01
  • 2013-09-18
  • 1970-01-01
相关资源
最近更新 更多