webservice 配置
<system.web> <!--允许GET/POST请求 --> <webServices> <protocols> <add name="HttpSoap" /> <add name="HttpPost" /> <add name="HttpGet" /> <add name="Documentation" /> </protocols> </webServices> </system.web> <system.webServer> <!--允许跨域请求 --> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Methods" value="OPTIONS,POST,GET" /> <add name="Access-Control-Allow-Headers" value="x-requested-with,content-type" /> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders> </httpProtocol> </system.webServer>