Adobe Flex: Why do I get intermittent SecurityErrorEvents on some browsers?
Our flex app talks back to its originating server over a TCP-socket connection. This requires an allowance from the server in question and thus we've set up a socket policy server at the host (source code at pastie.org/791060).
This has worked fine on many permutations of Firefox, Safari, Windows and Mac OS X, but then yesterday we discovered problems with IE 7 on Windows XP. In about 50% of the cases a SecurityErrorEvent is rais开发者_如何学JAVAed upon socket.connect. This despite calling Security.loadPolicyFile("xmlsocket://:843") before connecting, and the observation of the socket policy server transmitting the socket policy data to the client (checked with tcpdump). The error can often be undone by reloading the flash app in question, while restarting IE triggers its return.
Why do we see this intermittent errors, and what can we do about them?
Regards, Ville Jutvik Jutvik Solutions
I've pinned the issue down to a bad socket policy server implementation. It seems like it hanged up too early in the TCP conversation with the flash client (didn't wait for the string), causing the connection errors under some circumstances, IE 7 on Windows XP notably. I didn't know that it was so easy to create havoc on the TCP level from the user level...
Heath: Thank you for your time. I will keep your hypothesis of the firewall acting up in my mind because I will surely encounter it later on as our testing progresses.
/Ville
精彩评论