13

I have both WebDAV installed and running on my site, as a virtual sub site i have a MVC WebAPI site, the API works great, until I try to send a PUT request to it, then i get the below error:

HTTP Error 500.21 - Internal Server Error

Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list

If I disable WebDAV, then everything works fine and I get no errors. This only happens when WebDAV is enabled.

I have all of the following code in my web.config:

<system.webServer>
  <validation validateIntegratedModeConfiguration="false" />
  <modules runAllManagedModulesForAllRequests="false">
    <remove name="WebDAVModule" />
  </modules>
  <handlers>
    <remove name="WebDAV" />
    <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
    <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
    <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
    <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
    <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
    <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
  </handlers>
</system.webServer>

I've tried messing with various app pools.

I've also tired all of the things mentioned in all of these questions:

How to get rid of this error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list

How to fix: Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

None of this has solved my issue, is there anything else out there that I have not tried?

4

5 回答 5

22

我们最终带着这个去了微软,他们审查了几个星期,然后回来说不可能在同一个站点上运行 WebDAV 和 WebAPI

他们将尝试在 IIS 的未来版本中解决此问题。

于 2013-07-10T19:39:29.700 回答
5

@jblaske 有很好的回应。

如果您想暂时删除它,那么也许这篇文章是最好的解决方案。

如果您想一起删除处理程序,请按照以下步骤操作。

  1. 打开 IIS 并转到相关站点。
  2. 单击“处理程序映射”
  3. 找到名为“WebDAV”的处理程序
  4. 选择它并删除它

这是我原来的帖子

于 2017-02-23T18:28:24.180 回答
1

从 IIS 手动删除 WebDAV 模块和处理程序以使 PUT 工作后,我开始收到此错误。我不得不删除“WebDAV Publishing”服务器角色来克服这个错误。删除此角色并重新启动 IIS 后,PUT 工作正常。

在此处输入图像描述

于 2018-08-14T10:44:42.540 回答
0

您可能在处理程序的声明中遇到拼写错误。Thomas Marquardt 的博客 说

5.0 故障排除

如果您收到与以下类似的错误,则您的部分可能无效。

HTTP 错误 500.21 - 内部服务器错误处理程序“”在其模块列表中有一个错误的模块“ManagedPipelineHandler” 您可能有一个不具备正确前提条件的处理程序映射。IIS 不会容忍拼写错误,并且前提条件是区分大小写的。文本必须是 preCondition=”integratedMode” 或 preCondition=”classicMode”。

此外,该文章的评论中的另一个建议:

安德鲁·约翰逊 2011 年 1 月 25 日凌晨 3:20 #:

我发现如果处理程序具有 requireAccess="None",我也可以得到“处理程序在其模块列表中有一个错误的模块 ManagedPipelineHandler”。对我来说,将其更改为 requireAccess="Read" 会使错误消失。

该评论可能适用于您的情况,因为我在 applicationHost.config 中看到 WebDav 处理程序的条目是(注意requredAccess="None"):

<add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" />
于 2013-06-21T14:18:27.903 回答
0

Found an alternate for this issue. When the patches of the server were pushed,The default framework were set back to 2.0. Re register .Net framework by going to framework 4.0 folder C:\Windows\Microsoft.NET\Framework64\v4.0.30319 Executing the command aspnet_regiis -I

Check the web.config to match the .Net framework version

Go to IIS -> Application pool, set the .Net framework values to 4.0 Restart the IIS.

于 2019-05-31T11:01:17.090 回答