WebApi 使用PUT和DELETE时报405的问题

最近两天写了个项目,里面有一个接口是用谓词delete接收请求。
本地完全没问题,但是当发布到服务器上之后(IIS7.5),就报出 405.0 - Method Not Allowed

很明显是配置问题。
经过查找资料找到解决方法:在Web.config中添加一段配置

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

    .....
原文地址:https://www.cnblogs.com/TiestoRay/p/5434747.html