Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

StackExchange MiniProfiler UrlRoutingModules does not implement IHttpHandlerFactory

Miniprofiler on my site has stopped working. In Chrome console, I get a 500 error on:

/mini-profiler-resources/includes.js?v=4.0.0.0

The error is:

Server Error in '/' Application.

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

My web.config file has the following relevant lines:

  <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>
like image 444
Tom Gullen Avatar asked Oct 02 '17 10:10

Tom Gullen


1 Answers

Please add below

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
  </system.webServer> 

To web.config and see if it helps? If that doesn't work then check if you are able to access the files using localhost

http://127.0.0.1:<port>/mini-profiler-resources/includes.js?‌​v=4.0.0.0

If nothing works give uninstall and reinstalling MiniProfiler also a shot. Sometime re-installations do wonders

like image 156
Tarun Lalwani Avatar answered Sep 21 '22 23:09

Tarun Lalwani