XMLHttpRequest cannot load http://10.19.1.59/ArcGIS/rest/services/mapWGS/MapServer/?f=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
II7
在服务器端 C:\Inetpub\wwwroot\ArcGIS\rest\Web.Config 和 C:\Inetpub\wwwroot\ArcGIS\Services\Web.Config 中添加以下段落
<system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*"/> </customHeaders> </httpProtocol> </system.WebServer>
II6
IIS下ArcGIS右键'属性','HTTP头'在'自定义HTTP头'中添加头名'Access-Control-Allow-Origin',值'*'