【发布时间】:2017-03-22 04:55:17
【问题描述】:
我有与大多数人相反的问题。我失败的动词是 GET 和 POST。出于某种原因,允许 PUT 和 DELETE。这是我的相关 web.config。
<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>
【问题讨论】:
-
我也试过添加 remove name="WebDAV" 但什么也没做。
-
你是在本地运行它还是失败了?
标签: asp.net-web-api http-status-code-405 httpverbs