I am using as3httpclient library which uses Flash Socket for http communication. My swf is accessed from this address:
When I try to do a POST request to the server, after a few seconds I get exactly this Flash error:
Error #2048: Security sandbox violation: http://xxx.yyy.com/flash/UploadCharInfo.swf?1439403065 cannot load data from xxx.yyy.com:80.
I have put this cross-domain policy xml:
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*"/>
<allow-http-request-headers-from domain="*" headers="*"/>
<allow-http-request-headers-from domain="*"/>
</cross-domain-policy>
at http://xxx.yyy.com/crossdomain.xml
In my code I have put at the top of the code:
Security.allowDomain("*");
Security.loadPolicyFile("http://xxx.yyy.com/crossdomain.xml");
I still get the dreaded #2048 error. What else is there to try?!
PS. My code works fine from within Flash Builder's debugging sandbox. The error appears when I try to play my swf online.
PS2. Just found another VERY similar answer here:Annoying Error #2048: Security sandbox violation from localhost