PUT and DELETE returns 404 for asp.net webapi in Windows 2008 Server IIS 7 and 7.5

后端 未结 4 635
情书的邮戳
情书的邮戳 2021-01-18 07:03

I run into 500 - Internal Server Error when PUT/DELETE with windows 2008 server IIS. The response I get is:



        
4条回答
  •  鱼传尺愫
    2021-01-18 07:38

    I make the Neil S` information more exact:

    1. Delete WebDAV from "Modules"
    2. Delete WebDAV from "Handler Mappings"
    3. I delete WebDAV from IIS components to make sure WebDAV not exists and restart Windows
    4. Go to "Handler Mappings" and find ExtensionlessUrlHandler (for 32 and 64 and Integrated), open it and go to "Request Restrictions" to second chapter "Verbs" and put some of the methods you need to the string. I have the next: GET,HEAD,POST,DEBUG,PUT I repeat the changes for three "ExtensionlessUrlHandler" states.
    5. I do not change Request Filtering settings

    So, 404 and 405 error for Put method was disappeared, I receive 200 status.

    This solution works for me.

提交回复
热议问题