JQuery invoke remote webservice

Sending the Access-Control-Allow-Origin header allows basic cross-origin access, but calling ASP.NET services like ASMX ScriptServices, ASPX page methods, and WCF services with AspNetCompatibilityRequirements enabled requires your site to respond with one additional CORS header: Access-Control-Allow-Headers

You can configure the same in web.config as follows,

<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
</customHeaders>
</httpProtocol>
</system.webServer>
上一篇:java13 InputStream,Reader


下一篇:0308-标签的用法(a,ul/ol,table)