POST访问.json文件出现 HTTP 错误 405.0 - Method Not Allowed

来源:互联网 发布:sql disable trigger 编辑:程序博客网 时间:2024/06/02 06:34

看了 StaticFile 是接收所有谓词的

试了几种方式后还是不行


最后报着侥幸的心里试了 将处理程序映射到了ASP 结果居然可以用了 


附上 Web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension=".json" mimeType="text/json" />
        </staticContent>
        <handlers>
            <add name="json" path="*.json" verb="*" modules="IsapiModule" scriptProcessor="C:\windows\system32\inetsrv\asp.dll" resourceType="Unspecified" preCondition="bitness64" />
        </handlers>
    </system.webServer>
</configuration>

0 0
原创粉丝点击