惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Security Archives - TechRepublic
Security Archives - TechRepublic
Forbes - Security
Forbes - Security
C
Cyber Attacks, Cyber Crime and Cyber Security
Latest news
Latest news
V2EX - 技术
V2EX - 技术
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
Vercel News
Vercel News
V
Vulnerabilities – Threatpost
I
InfoQ
GbyAI
GbyAI
有赞技术团队
有赞技术团队
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
A
Arctic Wolf
F
Full Disclosure
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Check Point Blog
Hugging Face - Blog
Hugging Face - Blog
Simon Willison's Weblog
Simon Willison's Weblog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
Engineering at Meta
Engineering at Meta
The Register - Security
The Register - Security
T
Tor Project blog
T
Troy Hunt's Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Security Affairs
W
WeLiveSecurity
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Stack Overflow Blog
Stack Overflow Blog
Apple Machine Learning Research
Apple Machine Learning Research
H
Heimdal Security Blog
S
Secure Thoughts
Y
Y Combinator Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Security Latest
Security Latest
Martin Fowler
Martin Fowler
G
Google Developers Blog
宝玉的分享
宝玉的分享
腾讯CDC
TaoSecurity Blog
TaoSecurity Blog
T
Threatpost
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Project Zero
Project Zero
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
MongoDB | Blog
MongoDB | Blog

博客园 - GIS小能

利用Simplify进行ArcGIS Server多面合并查询 关于Flex Ant的相关注意事项 ArcGIS KeyGen注册机,五步操作实现ArcGIS9.X与ArcGIS10全模块无时限破解(转载:我是一只牛) Flex开发必知(1) ArcGIS Server 10 问题汇总 ArcGIS Server 10 许可文件 Ecp 基于flex及SVG技术打造交互式地图(数据篇) 将应用程序从Flex 3迁移至Flex 4(转载) ArcGIS 10 破解安装(desktop及ArcGIS Server 10) 基于Geoserver配置多图层地图以及利用uDig来进行样式配置 基于ArcGIS Server 10 在flex瓦片客户端叠加瓦片服务 胡说八道--mate flex 优化原则 flex与flash交互详解 flex调用WMS远程图片所产生安全错误 flex一周精选(20100308) 解析MapBar兴趣点加载原理 Flex一周精选(20100301) 浅谈Image和Bitmap
loder导致的安全沙箱的2122错误
GIS小能 · 2010-04-06 · via 博客园 - GIS小能

前两天在做loader加载图片的时候,虽然在服务端的Root下面已经有crossdomain.xml的跨域文件,但却意外的发现仍然报出了安全沙箱的错误,当然最后还是解决了,只能说,flash的安全性真是很麻烦:

A机:发布地图服务端(spring),中间件为tomcat 5.0

B机:客户端SWF

Flex Code:

代码

var imgSource : String = SysConfig.symbolServiceURL + "/" + eventInfo.subTypeID + ".gif";
var imageLoader:Loader 
= new Loader(); 
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,partImageLoadComplete);
imageLoader.load(
new URLRequest(imgSource));

问题:当客户端访问时,报出如下错误:

加载或要素对象失败!Error #2122:

安全沙箱冲突:LoaderInfo.content:http://192.168.0.69:8088/hzcg/home/map/gis/MainMapClient.swf

不能访问 http://192.168.0.247:8085/flex/symbol/custom_1.gif。需要一个策略文件,但在加载此媒体时未设置 checkPolicyFile 标志。

解决办法:

var imgSource : String = SysConfig.symbolServiceURL + "/" + eventInfo.subTypeID + ".gif";

var imageLoader:Loader = new Loader();

imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,partImageLoadComplete);

var lc:LoaderContext = new LoaderContext(true);

lc.checkPolicyFile = true;

imageLoader.load(new URLRequest(imgSource),lc);