iis-7 – PUT和DELETE在Windows 2008 Server IIS 7和7.5中为asp.
我在使用
Windows 2008服务器IIS进行PUT / DELETE时遇到500 – 内部服务器错误.我得到的回应是:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>500 - Internal server error.</title> <style type="text/css"> <!-- Formatting --> </style> </head> <body> <div id="header"><h1>Server Error</h1></div> <div id="content"> <div class="content-container"><fieldset> <h2>500 - Internal server error.</h2> <h3>There is a problem with the resource you are looking for,and it cannot be displayed.</h3> </fieldset></div> </div> </body> </html> 当我检查我的WebAPI的自定义日志时,我发现该呼叫甚至没有命中该服务. 我之前的经验是获得了404 – 找不到PUT和DELETE,这种行为在Win7和Win 2008 Server中是一致的.对于那个I found this fix: 我在Windows 7上应用了修复和PUT / DELETE工作.但是之后在win2008服务器上的IIS 7上部署相同的服务时,我没有得到400.但是我甚至在此之前从IIS得到“500 – 内部服务器错误” . 相同的代码在Windows 7(IIS 7.5)上完美运行. 解决此类问题的任何线索? 2012年8月29日编辑: 通过在IIS7中启用故障跟踪来检测500内部服务器错误的问题.修复是这种配置. <modules runAllManagedModulesForAllRequests="true"> <remove name="WebDAVModule" /> </modules> <handlers> <remove name="WebDAV" /> </handlers> 基本上我们需要从模块中删除“WebDAVModule”,并从Handler中删除“WebDAV”.但现在我回到我的旧版404-Not Found.现在即使具有以下配置,我也无法使PUT / DELETE工作: <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*" verb="GET,HEAD,POST,DEBUG,PUT,DELETE" type="System.Web.Handlers.TransferRequestHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" /> 异常相同的Web应用程序可以在同一系统相同的IIS上单独托管(不在默认网站下).所以我怀疑这是由于一些父网站配置过滤PUT / DELETE请求. 有什么想法吗? 解决方法
我更准确地使Neil S`信息:
>从“模块”中删除WebDAV 因此,Put方法的404和405错误消失了,我收到200状态. 这个解决方案适合我. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- windows-server-2003 – Windows Server 2003 – 授予用户完
- windows下PHP_intl.dll正确配置方法(apache2.2+php5.3.5)
- Windows任务计划程序 – 当进程(EXE)未运行时运行操作
- Windows – 在Mingw Nvidia SDK上编译OpenCL
- windows-server-2008 – Windows Server 2008上的管理工具中
- Windows中当前目录和工作目录之间的区别
- windows – 退出域控制器
- 命令行 – 从命令行修剪文本文件(Windows)
- .net – Windows DPAPI – 如何处理熵?
- windows-7 – 有没有办法集中管理Dropbox /集中禁用Windows