Flex - 安全沙箱违规 - 错误#2048 [英] Flex - Security Sandbox violation - ERROR#2048

查看:24
本文介绍了Flex - 安全沙箱违规 - 错误#2048的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以如果我把 -http://xxx.xx.xx.x/website/website.html 并尝试在 swf 中使用 HTTPService 联系 -https://yyy.yy.yy.y/resources/script,我收到沙箱错误.如果我把 -https://yyy.yy.yy.y/crossdomain.xml在浏览器中访问它,跨域文件中的所有内容看起来都很好.wWen 我回去尝试使用来自 -http://xxx.xx.xx 的 HTTPService.x/website/website.html 现在一切正常,直到我关闭浏览器,我认为它会清除缓存.

********crossdomain.xml************

<跨域策略><site-control allowed-cross-domain-policies="master-only"/><allow-access-from domain="*"/><allow-http-request-headers-from domain="*" headers="*"/></跨域策略>

********动作脚本****************

Security.loadPolicyFile("https://xxx.xx.xx.x/crossdomain.xml");

解决方案

更改以下行:

到:

您可以在 adobe.com 上阅读更多相关信息...

http://kb2.adobe.com/cps/142/tn_14213.html>

So if i put -http://xxx.xx.xx.x/website/website.html and try to use an HTTPService with in the swf to contact -https://yyy.yy.yy.y/resources/script, I get the sandbox error. If I put -https://yyy.yy.yy.y/crossdomain.xml in the browser and access it everything in the crossdomain file looks fine. wWen i go back and try to use the HTTPService from -http://xxx.xx.xx.x/website/website.html everything now works until i close the browser which i assume clears the cache.

********crossdomain.xml*********

<?xml version="1.0" ?>
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="master-only"/>
  <allow-access-from domain="*"/>
  <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

********Action Script*************

Security.loadPolicyFile("https://xxx.xx.xx.x/crossdomain.xml");

解决方案

Change the following line:

<allow-access-from domain="*"/>

to:

<allow-access-from domain="*" secure="false" />

You can read more about it at adobe.com...

http://kb2.adobe.com/cps/142/tn_14213.html

这篇关于Flex - 安全沙箱违规 - 错误#2048的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆