1
我有许多其他人的相反问题。我的失败动词是GET和POST。出于某种原因允许PUT和DELETE。这是我的相关web.config。Web Api GET动词405不允许
<system.webServer>
<handlers>
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
<rewrite>
<rules>
<rule name="static dist files" stopProcessing="true">
<match url="^(.+)$" />
<conditions>
<add input="C:\Source\PRISM\DEV\PRISM\Service\PRISM.Service\dist\{R:1}" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="/dist/{R:1}" />
</rule>
<rule name="index.html as document root" stopProcessing="true">
<match url="^$" />
<action type="Rewrite" url="/dist/index.html" />
</rule>
</rules>
</rewrite>
我也尝试添加删除名称=“WebDAV”,但它什么也没做。 –
你在本地运行它,它失败或? –