16

I'm getting this error while running my ASP.NET app on IIS7. I've tried doing what it says to do but it doesn't help.

The WebResource.axd handler must be registered in the configuration to process this request.

> <!-- Web.Config Configuration File -->
> 
> <configuration>    
>     <system.web>
>        <httpHandlers>
>            <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
>        </httpHandlers>    
>     </system.web> 
> </configuration>

I'm using a little bit of AJAX which is what I think is causing the issue. Has anyone encountered this before?

Russell Patterson
  • 622
  • 3
  • 10
  • 23

6 Answers6

16

I figured it out so I'm posting it here for search reasons. It is a bug in ASP.NET and it has to do with having ColdFusion installed. Microsoft hasn't yet released a fix.

There are two ways to fix this.

  1. Change the AppPool in IIS7 to "Classic .NET AppPool". I'm not sure of any implications with this setting.

  2. Remove all the references to ColdFusion from your applicationHost.config file in system32\inetsrv\config.

Russell Patterson
  • 622
  • 3
  • 10
  • 23
  • So there is no workaround so that we can use integrated mode at all? Edit: try this - http://ericfickes.com/2010/02/coldfusion-and-asp-net-coexisting-on-iis-whered-webresource-axd-go/ – Drew Freyling May 17 '11 at 13:52
  • The implications for removing all reference to CF from .config would be good to know. I had my server admin change the AppPool to run under Classic .NET and it fixed my problem, but I don't dare ask the server admin to remove all CF references without knowing beforehand what it might affect. – Jagd Feb 02 '12 at 21:50
  • No CF installed on my server, but changing the AppPool from Integrated to Classic solved the issue. Thanks! – DanM7 Nov 22 '13 at 13:56
  • Wouldn't just removing the CF Handler Mappings, most importantly the "wild-card" (aka Path: *) mapping be sufficient? This article from MS would seem to support my assertion: http://support.microsoft.com/kb/2505146 – frogstarr78 Jan 31 '14 at 18:11
10

ColdFusion installs a global wildcard handler mapping which apparently overrides many of the standard .NET handlers. The solutions mentioned work just fine, but if you can't switch to Classic Mode and don't want to screw with your ColdFusion installation, you can remove the inherited handler mapping at the individual site level.

To do this, go to the site in question in IIS, double-click on "Handler Mappings" under the "IIS" section, and find the handler named something like "AboMapperCustom-XXXXXX" with "*" for the Path. Select the entry and click "Remove" in the sidebar. This will only remove the mapping for your application, so it won't break any existing CF sites on the server.

Josh Schultz
  • 8,000
  • 9
  • 32
  • 39
  • 3
    Yes, this gets you a fix without sacrificing integrated mode or ColdFusion. – James Lawruk Jun 21 '12 at 03:36
  • 1
    [hotfix](http://support.microsoft.com/kb/2591200/en-us) from microsoft. But i suggest removing '*' handler 'AboMapperCustom-26...' coming from ColdFusion and using Integrated Mode. – Fredrick Gauss Jan 09 '13 at 09:03
  • 2
    I still like the accepted answer (changing to "Classic" mode), but this one actually fixes the REAL problem and helps us understand what's going on. Thanks! – TheGerm Oct 31 '13 at 21:16
1

I got this error after carelessly copying my app's web.config between a pair of clustered servers, which overwrote the tag:

<system.webServer>
    <handlers>
        <remove name="AboMapperCustom-XXXXXXXX" />
    </handlers>
</system.webServer>

with

<system.webServer>
    <handlers>
        <remove name="AboMapperCustom-YYYYYYYY" />
    </handlers>
</system.webServer>

Locating the proper ID as per Josh's response and correcting the tag fixed it, but more importantly, will presumably keep that handler mapping from sneaking back in.

1

In IIS7 you need to add the <httpHandler> section to <system.webServer> instead of <system.web>. Here is an example.

Klaus Byskov Pedersen
  • 117,245
  • 29
  • 183
  • 222
  • 1
    Adding to that section causes VS to say that there's an invalid child element error. I also tried adding it to the section in but it doesn't solve the problem. – Russell Patterson Apr 16 '10 at 17:38
1

The issue happened to me on new Windows 2016 server where ASP.NET 4.6 was not installed. After installation everything got fixed.

Steps

- Run Server Manager
- Manage > Add Roles and Features 
- Server Roles
- Web Server (IIS) > Web Server > Application Development > ASP.NET 4.6

enter image description here

mybrave
  • 1,662
  • 3
  • 20
  • 37
0

I had this problem and that reason was incompatibility between Coldfusion and some configurations of ASP.NET applications when IIS App pool is in integrated mode. Coldfusion must be disable .

hassan
  • 11
  • 1