StackExchange MiniProfiler UrlRoutingModules does not implement IHttpHandlerFactory
Asked Answered
O

1

7

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>
Oloughlin answered 2/10, 2017 at 10:29 Comment(5)
What is the value for runAllManagedModulesForAllRequests in your web.config?Zahara
What version of IIS are you running? support.microsoft.com/en-us/help/980368/…Airiness
@TarunLalwani that key is not specified in my web.configOloughlin
@OluwafemiSule 10.0.15063.0Oloughlin
@OluwafemiSule also cannot install the hotfix, "The certificate for the signer of the message is invalid or not found"Oloughlin
Z
1

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

Zahara answered 11/10, 2017 at 10:40 Comment(5)
Can you check if http://127.0.0.1:<port>/mini-profiler-resources/includes.js?v=4.0.0.0 works? Use the port configuredZahara
See if this helps ? https://mcmap.net/q/1628591/-mvc-mini-profiler-1-4-amp-iisZahara
Unfortunately notOloughlin
Reinstalled Miniprofiler and got it working again now. Not sure why that fixed it. IF you want to edit your answer to suggest uninstall/reinstall I'll mark it as correct as you tried to help :)Oloughlin
@TomGullen, glad it works for you now :-). Answer updatedZahara

© 2022 - 2024 — McMap. All rights reserved.