开发者

MVC HttpDelete Verb causing 405 Method Not Allowed

I'm encounting a method now allowed exception when calling a controller action which accepts the Delete verb.

I thought the problem was that the HandlerMappings in IIS 7.0 were wrong and when I looked at:

ExtensionlessUrl-ISAPI-4.0_64bit
ExtensionlessUrl-ISAPI-4.0_32bit
ExtensionlessUrl-Integrated-4.0

Sure enough they didn't accept the D开发者_如何学运维ELETE verb. I added this to the list of Verbs but I am still getting an error so I'm at a loss as to why this is the case. Can anyone shed any light on this?


I discovered this issue was being caused by the WebDav module. I removed this from my web.config and this resolved the issue.

<system.webServer>
 <modules runAllManagedModulesForAllRequests="true">
    <remove name="WebDAVModule" />
 </modules>
</system.webServer>

Hope this helps someone else!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜