405 on WebApi PUT, DELETE request - HTTP verb not allowed to access this page.

During development, the new WebApi project needs to use the Restful specification. At this time, the requests include POST\PUT\DELETE\GET and other requests

At this point, you need to add it to web.config

<system.webServer>
    <handlers>
      <remove name="WebDAV" />
    </handlers>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <remove name="WebDAVModule" />
    </modules>
  </system.webServer>

Otherwise a 405 - HTTP verb not allowed to access this page will appear.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325027351&siteId=291194637