我很不确定这个的原因。 在localhost上,所有请求类型都有效。
但是当我发布到Windows Azure共享站点时 GET,POST& PUT请求工作和DELETE请求失败。
在创建数据后我无法删除它,这发生在我的本地ISP上,并通过我的手机上网进行。
我已经尝试了
这就是我回来的全部。
HTTP/1.1 403 Access Denied
Date: Mon, 08 Jun 2015 16:15:44 GMT
Connection: keep-alive
Cache-Control: no-store
Content-Type: text/html
Content-Language: en
Content-Length: 249
答案 0 :(得分:3)
您可能只需要在web.config中启用DELETE谓词。
(来源:http://microsoftazurewebsitescheatsheet.info/#enable-http-verbs)
<configuration>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrl-Integrated-4.0" />
<add name="ExtensionlessUrl-Integrated-4.0"
path="*."
verb="GET,HEAD,POST,DEBUG,DELETE,PUT"
type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
</configuration>