XMLSocket在Firefox中工作,但不是IE

时间:2022-06-01 14:05:33

I'm helping a customer who has a problem with a flash app. The flash app uses an XMLSocket to connect to a service running on localhost. It works fine under firefox.

我正在帮助一个有Flash应用程序问题的客户。 Flash应用程序使用XMLSocket连接到localhost上运行的服务。它在firefox下工作正常。

It uses the following line to setup the security policy:

它使用以下行来设置安全策略:

System.security.loadPolicyFile("xmlsocket://localhost:10032");

Running the flash app under firefox, the service listening on port 10032 gets a connection with a <policy-file-request/>, responds to it, and it works well. Under IE, the service never gets the connection and the subsequent socket connection do not work.

在firefox下运行flash应用程序,侦听端口10032的服务获取与 的连接,响应它,并且运行良好。在IE下,服务永远不会获得连接,后续的套接字连接不起作用。

EDIT: The problem turned out to be caused by embedding flash in a hidden div tag. In that case it refused to send out the policy file request. With the div not hidden it works. The answer about different versions of flash between FF and IE was right on, that's why it was working in FF (it was an older version). The newer version didn't like the hidden DIV tag.

编辑:问题原来是由隐藏的div标签中嵌入flash引起的。在这种情况下,它拒绝发出策略文件请求。 div没有隐藏它的工作原理。关于FF和IE之间不同版本的闪存的答案是正确的,这就是为什么它在FF工作(它是旧版本)。较新的版本不喜欢隐藏的DIV标签。

2 个解决方案

#1


1  

Are you certain the exact same version of flash is running on both browsers? The requirements for network security seem to have changed significantly between versions. It's entirely possible to have different versions of flash player installed into IE and firefox as one is an activeX control and the other a browser plugin.

您确定两种浏览器上都运行完全相同的Flash版本吗?网络安全的要求似乎在不同版本之间发生了显着变化。完全有可能在IE和Firefox中安装不同版本的Flash播放器,因为一个是activeX控件,另一个是浏览器插件。

#2


0  

Add "new line" byte to the end of sending request to policy file.

在发送请求到策略文件的末尾添加“新行”字节。

Like this: "" + "\n"

像这样:“”+“\ n”

#1


1  

Are you certain the exact same version of flash is running on both browsers? The requirements for network security seem to have changed significantly between versions. It's entirely possible to have different versions of flash player installed into IE and firefox as one is an activeX control and the other a browser plugin.

您确定两种浏览器上都运行完全相同的Flash版本吗?网络安全的要求似乎在不同版本之间发生了显着变化。完全有可能在IE和Firefox中安装不同版本的Flash播放器,因为一个是activeX控件,另一个是浏览器插件。

#2


0  

Add "new line" byte to the end of sending request to policy file.

在发送请求到策略文件的末尾添加“新行”字节。

Like this: "" + "\n"

像这样:“”+“\ n”