首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >StackExchange MiniProfiler UrlRoutingModules不实现IHttpHandlerFactory

StackExchange MiniProfiler UrlRoutingModules不实现IHttpHandlerFactory
EN

Stack Overflow用户
提问于 2017-10-02 10:29:03
回答 1查看 640关注 0票数 7

我网站上的迷你剖析器已经停止工作了。在Chrome控制台中,我在以下方面出现了一个500错误:

代码语言:javascript
复制
/mini-profiler-resources/includes.js?v=4.0.0.0

错误是:

'/‘应用程序中的服务器错误。 System.Web.Routing.UrlRoutingModule不实现IHttpHandlerFactory或IHttpHandler。 描述:在执行当前web请求时发生了未处理的异常。请查看堆栈跟踪以获得有关错误的更多信息,以及它起源于代码的位置。

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

代码语言:javascript
复制
  <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>
EN

回答 1

Stack Overflow用户

发布于 2017-10-11 10:40:34

请添加以下内容

代码语言:javascript
复制
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
  </system.webServer> 

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

代码语言:javascript
复制
http://127.0.0.1:<port>/mini-profiler-resources/includes.js?‌​v=4.0.0.0

如果没有工作,请卸载和重新安装MiniProfiler也是一次尝试。有时重新安装会产生奇迹。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46523807

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档