webapi put 请求405问题

put 请求的时候  浏览器会像服务器发送两个请求 如何没做任何配置第一个options请求是会报错的 这是需要配置路由给options作响应

webapi put 请求405问题

这时options请求就通过了,然后你们会看到你的put请求有报错了,那么这时你就需要在web.config里面加上以下节点

<modules>
<remove name="WebDAVModule" />
</modules>

 <handlers>

  <remove name="WebDAV" />

 </handlers>

这里注意了 ,如果你有了modules或者handlers节点就别直接复制粘贴到你的配置文件里,因为这两个节点不能重复

 

相关文章:

  • 2022-03-07
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2021-10-27
  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
  • 2021-05-26
  • 2021-05-20
  • 2021-04-02
相关资源
相似解决方案