StackExchange MiniProfiler UrlRoutingModules没有实现IHttpHandlerFactory

Tom*_*len 6 web-config url-routing mvc-mini-profiler

我网站上的Miniprofiler已停止工作.在Chrome控制台中,我收到500错误:

/mini-profiler-resources/includes.js?v=4.0.0.0
Run Code Online (Sandbox Code Playgroud)

错误是:

'/'应用程序中的服务器错误.

System.Web.Routing.UrlRoutingModule没有实现IHttpHandlerFactory或IHttpHandler.

描述:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息.

我的web.config文件包含以下相关行:

  <system.webServer>
    <handlers>
      <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
    </handlers>
    <modules>
      <add name="DynamicURLRewrite" type="C3.Code.Controls.Application.Rewriting.URLRewriter" />
      <remove name="TelemetryCorrelationHttpModule" />
      <add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" preCondition="integratedMode,managedHandler" />
      <remove name="ApplicationInsightsWebTracking" />
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
    </modules>
Run Code Online (Sandbox Code Playgroud)

Tar*_*ani 1

请在下面添加

\n\n
  <system.webServer>\n    <modules runAllManagedModulesForAllRequests="true" />\n  </system.webServer> \n
Run Code Online (Sandbox Code Playgroud)\n\n

web.config看看是否有帮助?如果这不起作用,请检查您是否能够使用 localhost 访问文件

\n\n
http://127.0.0.1:<port>/mini-profiler-resources/includes.js?\xe2\x80\x8c\xe2\x80\x8bv=4.0.0.0\n
Run Code Online (Sandbox Code Playgroud)\n\n

如果不起作用,也可以尝试卸载并重新安装 MiniProfiler。有时重新安装会产生奇迹

\n