<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"
>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all" />
<allow-access-from domain="*" />
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

 

 

 

将此内容保存为crossdomain.xml,crossdomain.xml文件必须放置在域的根目录处,以tomcat为例,文件需放置在webapps\ROOT 下,IIS则放在C:\inetpub\wwwroot.

 

由于arcgis 9.3 server同样是以REST方式发布服务,所以当需要允许外域访问arcgis 服务时,同样需要设置跨域

crossdomain.xml放置的目录是{arcgis安装目录}\ArcGIS\java\web_output

PS:

补充下,在调试时layer.InitializationFailure.Message提示的是

A security exception occurred wile trying to connect to the rest endpoint make sure you hava a cross domain policy file acailable at the root for your server that allows for requests from this application

希望对刚开始学silverlight API的同学有帮助

相关文章:

  • 2021-12-02
  • 2021-11-22
  • 2022-12-23
  • 2021-10-28
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2022-12-23
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案