Getting “The WebResource.axd handler must be registered in the configuration to process this request.” error

倖福魔咒の 提交于 2019-12-03 08:52:09

问题


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?


回答1:


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.




回答2:


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.




回答3:


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




回答4:


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.




回答5:


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 .




回答6:


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



来源:https://stackoverflow.com/questions/2654514/getting-the-webresource-axd-handler-must-be-registered-in-the-configuration-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!