Flash Player不连接到套接字策略文件服务器 - 给出SecurityError#2048 [英] Flash Player doesn't connect to socket policy file server - gives SecurityError #2048

查看:1121
本文介绍了Flash Player不连接到套接字策略文件服务器 - 给出SecurityError#2048的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台运行在 http://192.168.0.179 的服务器。它提供一个Flash文件WebSocketMain.swf(来自 https://github.com/gimite/web- socket-js ),它试图做一个套接字连接到192.168.0.179:5000。我也有一个套接字策略文件服务器,运行在192.168.0.179:843。

这在运行服务器的机器上运行正常(运行OS X)。在该机器上,Flash连接到策略文件服务器,然后连接到端口5000上的WebSocket服务器。但是,在同一网络(192.168.0.175)上的Windows(64位)机器上运行Flash 10.3 / 11.2 / 11.3并在IE9 / Chrome中),我在JS控制台中得到以下错误消息:
$ b


LOG:[WebSocket] debug enabled p>

LOG:[WebSocket]策略文件:xmlsocket://192.168.0.179:843

[WebSocket]无法连接到Web套接字服务器在ws://192.168.0.179:5000 / websockettest(SecurityError:错误#2048:安全沙箱违规: http://192.168.0.179/assets/flash/WebSocketMain.swf 无法从192.168.0.179:5000加载数据)确保服务器正在运行,并且Flash套接字策略文件被正确放置

LOG:[WebSocket]关闭

根据服务器机器上的tcpdump和策略服务器日志,Flash Player甚至不连接到策略s有效期至192.168.0.179。从.175机器打开192.168.0.179:843,因此FP连接到它应该没有问题。我可以通过终端客户端(如PuTTY)从.175机器连接到它,并接收策略文件没有问题。只是为了确保我也禁用了Windows防火墙,也没有任何效果。

我已经尝试修改WebSocketMain.swf显式调用Security.loadPolicyFile(),而不是调用它完全没有效果。我也尝试在代码中添加Security.allowDomain(*)。依然没有。我甚至尝试修改FP将连接到的URL(由Web服务器提供)到192.168.0.179:80。没有。 192.168.0.179:10000也不起作用。即使127.0.0.1和本地主机也不起作用,给出相同的错误信息



有什么可能导致这个?为什么FP甚至不尝试连接到策略服务器?

解决方案

发现问题:有一个全局配置文件mms在设置 DisableSockets = 1 的机器上.cfg。这导致了SecurityError并阻止Flash Player连接到策略文件服务器。将其设置为0(这是默认值),一切正常。有关此文件的详细信息,请参阅 http: //www.adobe.com/content/dam/Adobe/en/devnet/flash/articles/flash_player_admin_guide/flash_player_admin_guide.pdf 第四章

I have a server running at http://192.168.0.179. It serves a flash file, WebSocketMain.swf (from https://github.com/gimite/web-socket-js), which tries to do a socket connection to 192.168.0.179:5000. I also have a socket policy file server running at 192.168.0.179:843.

This works fine on the machine the server is running on (running OS X). On that machine, Flash connects to the policy file server and then to the WebSocket server at port 5000. However, on a Windows (64-bit) machine on the same network (192.168.0.175), running Flash 10.3/11.2/11.3 (and in both IE9/Chrome), I get the following error message in the JS console:

LOG: [WebSocket] debug enabled

LOG: [WebSocket] policy file: xmlsocket://192.168.0.179:843

[WebSocket] cannot connect to Web Socket server at ws://192.168.0.179:5000/websockettest (SecurityError: Error #2048: Security sandbox violation: http://192.168.0.179/assets/flash/WebSocketMain.swf cannot load data from 192.168.0.179:5000.) make sure the server is running and Flash socket policy file is correctly placed

LOG: [WebSocket] closed

According to tcpdump and the policy server log on the server machine, Flash Player does not even connect to the policy server at 192.168.0.179. 192.168.0.179:843 is open from the .175 machine, so there should be no problem for FP to connect to it. I can connect to it through a terminal client (such as PuTTY) from the .175 machine and receive the policy file without a problem. Just to be sure I also disabled the Windows Firewall, also with no effect.

I have tried modifying WebSocketMain.swf to calling Security.loadPolicyFile() explicitly and not calling it at all, with no effect. I have also tried adding Security.allowDomain("*") in the code. Still nothing. I even tried modifying the URL to which FP will connect to (which is served by the web server) to 192.168.0.179:80. Nothing. 192.168.0.179:10000 doesn't work either. Even 127.0.0.1 and localhost doesn't work, giving the same error message

What could possibly be causing this? Why won't FP even try to connect to the policy server?

解决方案

Found the problem: There was a global configuration file mms.cfg on the machine that set DisableSockets=1. This casued the SecurityError and prevented Flash Player from connecting to the policy file server. Set it to 0 (which is the default) and everything worked. For details on this file, see http://www.adobe.com/content/dam/Adobe/en/devnet/flash/articles/flash_player_admin_guide/flash_player_admin_guide.pdf Chapter 4.

这篇关于Flash Player不连接到套接字策略文件服务器 - 给出SecurityError#2048的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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