欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Put Delete 请求报错Not Allow Method的解决方案

程序员文章站 2022-04-15 12:35:58
...

修改web.config,移除WebDAVModule:

<system.webServer>
  <modules runAllManagedModulesForAllRequests="true">
   <remove name="WebDAVModule"/>
  </modules>
    <handlers>
      <remove name="WebDAV" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
  </system.webServer>