XMLSocket working in firefox but not IE

淺唱寂寞╮ 提交于 2019-12-25 03:12:17

问题


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.

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.

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.


回答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.




回答2:


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

Like this: "" + "\n"



来源:https://stackoverflow.com/questions/203068/xmlsocket-working-in-firefox-but-not-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!