恼人的错误#2048:从本地主机安全性违规 [英] Annoying Error #2048: Security sandbox violation from localhost
问题描述
这是我的crossdomain.xml,我把我的的Web.config
的同一个文件夹:
This is my crossdomain.xml that I put in the same folder of my Web.config
:
<?xml version="1.0"?>
<!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="*" secure="false" />
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>
虽然我可以加载使用在Security.loadPolicyFile(HTTP://本地主机:52090 / crossdomain.xml的)。
在我的SWF尝试的comunicate与本地的网站(asp.net MVC),它说:
When my swf try to comunicate with my local site (asp.net mvc) it says:
错误#2048:安全沙箱冲突:HTTP:/ /localhost:52090/Content/Swf/MyApp.swf无法从本地主机加载数据:52090
Error #2048: Security sandbox violation: http:/ /localhost:52090/Content/Swf/MyApp.swf cannot load data from localhost:52090
我该怎么解决呢?
推荐答案
由于您使用 as3httpclientlib
,基于插槽
,而不是的URLLoader
你应该设置套接字策略服务器,而不是http一(所以你的的crossdomain.xml
不在这种情况下,所使用的闪光)。
Since you use as3httpclientlib
that based on Socket
, rather than URLLoader
you should setup socket policy server instead of http one (so your crossdomain.xml
isn't used by flash in this case).
要设置闪光策略服务器可以使用Perl脚本从这篇文章 HTTP:/ /www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html 与@Bart Friederichs建议策略XML(以到端口
属性)
To setup flash policy server you can use perl script from this article http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html with policy xml suggested by @Bart Friederichs (with to-ports
attribute)
这篇关于恼人的错误#2048:从本地主机安全性违规的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!