开发者

IIS 7, MVC2 Web Service, HTTP 405 Error on PUT

This is a similar question as IIS 7.5, Web Service and HTTP 405 error but a little different. Instead of a WCF web service, I've got an MVC2 web servi开发者_运维知识库ce that returns a 405 error when a PUT is used in the request. And, in my case, POST works just fine.

I'm guessing I need to either add or tweak an IIS 7 Handler Mapping to get PUT to work but my hosting provider hasn't been much help. Anyone out there run into this and know how to get PUTs to work in an MVC2 web service running in IIS 7? My apologies if this has already been answered, I've been searching all day and haven't found the magical answer.

Any help would be greatly appreciated...


We had the same problem, and the solution was adding an element into section in the Web.config file:

<remove name="WebDAVModule"/>


Have a look at https://serverfault.com/questions/93424/how-to-enable-put-and-delete-in-iis7/93428#93428

dario-solera:

You can take a look at the "Handlers Mappings" sections at either the server or site level (IIS group). Select a mapping for an extension (e.g. .aspx) and select "Edit" from the context menu. The "Verbs" tab allows you to specify verbs to accept.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜