跨域请求
报错:Access to XMLHttpRequest at 'http://197.7.50.83:27/WebServices/other/PlaneHandlerJ.ashx' from origin 'http://197.7.50.83:8080' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
修改目标配置文件: Web.config
<customHeaders> <add name="Access-Control-Allow-Methods" value="OPTIONS,POST,GET"/> <add name="Access-Control-Allow-Headers" value="Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"/> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders>