安全沙箱冲突无法从box.net加载数据 [英] Security sandbox violation cannot load data from box.net

查看:212
本文介绍了安全沙箱冲突无法从box.net加载数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,它的上传/下载文件到/从box.net。该应用程序正常工作时,没有部署在服务器上,但是当我将它部署在谷歌应用程序引擎遇到下面的错误。

I have an application which upload/download files to/from box.net. the application works fine when not deployed on server but when I deploy it on Google App Engine the following error is encountered.

错误#2044:未处理的securityError:。文本=错误#2048:安全沙箱冲突: http://somexyz.appspot.com/xyzsample瑞士法郎不能从 http://box.net/api/1.0加载数据/下载/ ABCDEF / 123456

我已经包括了以下线的code在AS3

I have included the below lines of code in as3

Security.allowDomain("*");

和放置crossdomain.xml的在应用程序的根文件夹(谷歌应用程序引擎),并可以通过访问该文件的 somexyz.appspot.com/crossdomain.xml

and placed crossdomain.xml in app root folder (Google App Engine) and can access the file using somexyz.appspot.com/crossdomain.xml

crossdomain.xml的包含以下行

crossdomain.xml contains the below lines

<?xml version="1.0"?> 

<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd"> 

<cross-domain-policy>

   <site-control permitted-cross-domain-policies="all"/>

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

   <allow-http-request-headers-from domain="*" headers="*"/>

   <allow-http-request-headers-from domain="*"/>

</cross-domain-policy>

我也得到了同样的问题,当我试图使用Tomcat。

I am also getting the same issue when I tried using tomcat.

推荐答案

如果您是从box.net加载,你需要检查 http://box.net/crossdomain.xml

If you are loading from box.net, you need to check the http://box.net/crossdomain.xml

在那里你可以阅读以下内容:

and there you can read following:

<!--
Box has recently changed its crossdomain policy for API calls made from Flash.
To continue using Box API, please add the following line to the code of your Flash
application:
- AS2: System.security.loadPolicyFile("http://www.box.net/api/crossdomain.xml");
- AS3: Security.loadPolicyFile("http://www.box.net/api/crossdomain.xml");
-->

更新

请确保你将它添加corectly:

Please be sure that you are adding it corectly:

Security.loadPolicyFile("http://www.box.net/api/crossdomain.xml")

当加载:

*.load('http://www.box.net/api/1.0/download/abcdef/123456');

这样的路径,服务器将是相同的: http://www.box.net/

有关闪光灯 http://www.box.net/ 和的 http://box.net/ 2个不同的域名。

For flash the http://www.box.net/ and http://box.net/ are 2 different domain names.

这篇关于安全沙箱冲突无法从box.net加载数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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