IIS7.5上的REST服务的Put操作发生HTTP Error 405.0 - Method Not Allowed 解决方法

简介:
+关注继续查看

WebDAV 是超文本传输协议 (HTTP) 的一组扩展,为 Internet 上计算机之间的编辑和文件管理提供了标准.利用这个协议用户可以通过Web进行远程的基本文件操作,如拷贝、移动、删除等。在IIS 7.0中,WebDAV是作为独立扩展模块,需要单独进行下载,而IIS 7.5中将集成WebDAV,然而WebDav把Put,Delete给咔嚓了。所以在IIS 7.5上部署的RESTful服务(WCF Data Service,WCF Rest Service,ASP.NET Web API,ASP.NET MVC)就悲剧了,当发送Put请求就会发生HTTP Error 405.0 – Method Not Allowed错误,解决方法也很简单,在Web.config里面加入如下设置:

<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>




本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/p/5731486.html,如需转载请自行联系原作者

相关文章
|
2月前
|
Web App开发 前端开发 JavaScript
DevTools 无法加载 SourceMap 错误:状态代码 404,net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools 无法加载 SourceMap 错误:状态代码 404,net::ERR_HTTP_RESPONSE_CODE_FAILURE
49 0
|
2月前
|
前端开发 JavaScript
ajax请求的重定向处理--Request header field x-requested-with is not allowed by Access-Control-Allow-Header
ajax请求的重定向处理--Request header field x-requested-with is not allowed by Access-Control-Allow-Header
109 0
|
8月前
|
Apache Android开发
解决Failed resolution of: Lorg/apache/http/client/methods/HttpEntityEnclosingRequestBase的方案
解决Failed resolution of: Lorg/apache/http/client/methods/HttpEntityEnclosingRequestBase的方案
134 0
解决Failed resolution of: Lorg/apache/http/client/methods/HttpEntityEnclosingRequestBase的方案
|
9月前
POST 请求出现异常!java.io.IOException: Server returned HTTP response code: 400 for URL
POST 请求出现异常!java.io.IOException: Server returned HTTP response code: 400 for URL
708 0
|
Web App开发 JSON 数据格式
使用 http-proxy 代理 HTTP 请求时遇到的 the requested url is invalid 错误消息
使用 http-proxy 代理 HTTP 请求时遇到的 the requested url is invalid 错误消息
447 0
使用 http-proxy 代理 HTTP 请求时遇到的 the requested url is invalid 错误消息
|
对象存储
上传文件到OSS报错:[Server]Unable to execute HTTP request: Position is not equal to file length
上传文件到OSS报错:[Server]Unable to execute HTTP request: Position is not equal to file length
826 0
A new ABAP HTTP test client RSICFCLTST01
create a new test session using ways of URL by url: you have to specify url,proxy host andport number. Select created http session after “create” icon is pressed, then click tab Detail:
90 0
A new ABAP HTTP test client RSICFCLTST01
why I get 415 error for my http post Service request creation in JMeter
why I get 415 error for my http post Service request creation in JMeter
why I get 415 error for my http post Service request creation in JMeter
|
PHP
iis 访问HTTP 错误 500.0 - Internal Server Error无法在<fastCGI>应用程序配置中找到<handler> scriptProcessor
iis 访问HTTP 错误 500.0 - Internal Server Error无法在应用程序配置中找到 scriptProcessor
11271 0
|
缓存
http method and status code
http method HEAD: 只返回相应的header POST: 一般用于提交表单 PUT: 向Web服务器上传文件 GET: 查 DELET: 删除 status code 1xx与2xx: 返回提示信息 3xx: 重定向 4xx: 客户端错误 5xx: 服务器端错误 具体 20...
879 0