标签:modified pts request server val method exp expires -o
首先需要把[System.Web.Script.Services.ScriptService]前边的注释去掉,放开权限,其次需要在web.config 里<system.web节点下>添加
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
在外侧添加头信息的允许策略
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With" />
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE" />
</customHeaders>
</httpProtocol>
</system.webServer>
标签:modified pts request server val method exp expires -o
原文地址:http://www.cnblogs.com/wlhacker/p/6261781.html