7

我正在使用 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>

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

4

2 回答 2

0

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

<module runAllManagedModulesForAllRequests="true"/>
于 2012-09-15T17:04:22.130 回答
0
 <handlers>
    <remove name="UrlRoutingModule-4.0"/>
    <add  name="UrlRoutingModule-4.0" path="*" verb="*" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
  </handlers>
于 2019-05-21T13:20:52.697 回答