ArcGIS Server API For Flex 安全沙箱问题

 
   
<? 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的同学有帮助

转载于:https://www.cnblogs.com/biandande/archive/2011/01/10/1932079.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值