Getting error with MiniProfiler: System.Web.Routing.UrlRoutingModule does not implement IHttpHandlerFactory
Asked Answered
B

2

7

I'm using MiniProfiler to profile my ASP.NET 4 Webform application. In localhost it works fine, but when I deploy to IIS7 I receive the following error:

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

This is the web.config lines that gives me the error

<system.webServer>
<handlers>
  <add name="MiniProfiler" path="mini-profiler-resources" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>

Do you have any idea what should I do in this situation?

Blotter answered 4/9, 2012 at 17:9 Comment(3)
I'm getting the same error exactly, but I'm running under IIS6Fully
I do get the same error in Visual Studio Cassini server. No idea hw to fix itHacking
Can you review your path to see if it has any dot (.). The following path won't work: localhost:<port>/MyApplication.Admin.Crop
B
0

In the end, I ended up with using the following config. It might be overkill and not generally recommended, but I solved my problem

<module runAllManagedModulesForAllRequests="true"/>
Blotter answered 4/9, 2012 at 17:9 Comment(1)
@LDJ: Please make sure that your application path doesn't include "." character. For example localhost:1234/my-application.admin won't workCrop
Q
0
 <handlers>
    <remove name="UrlRoutingModule-4.0"/>
    <add  name="UrlRoutingModule-4.0" path="*" verb="*" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
  </handlers>
Quasar answered 21/5, 2019 at 13:20 Comment(1)
Would you like to add some commentary on your answer to explain which aspects resolve the original question?Saker

© 2022 - 2024 — McMap. All rights reserved.