PDA

View Full Version : SecurityErrorEvent that will not go away


drkstr
09-29-2007, 03:02 AM
I am loading data using remoting with AMFPHP which has worked fine with the following crossdomain.xml


<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="dev.splashlabs.com"/>
<allow-access-from domain="splashlabs.com"/>
</cross-domain-policy>


I had to recreate the project due to a flex builder error, and now I am getting a SecurityErrorEvent when I attempt to load the data.

Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security sandbox violation: http://localhost/acr/ACR.swf cannot load data from http://dev.splashlabs.com/gateway_url.php. where gateway_url.php is the full url to the data gateway.

The cross domain file I posted was copied directly from the file located at http://localhost/acr/crossdomain.xml and yet I can no longer load my data no matter what I try. What gives?

Any advice will be greatly appreciated.

Thanks!
...aaron

flexy
10-01-2007, 11:43 AM
For your crossdomain, could you not just use:

<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*splashlabs.com"/>
</cross-domain-policy>


But, you'll also notice that your localhost isn't mentioned in there, so by default will be knocked-back by your crossdomain policy.

Whilst not a permanent fix for you, does it work if you put:


<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>

drkstr
10-01-2007, 10:16 PM
Hmm, still no go. I tried it with the following:


<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*"/>
<allow-access-from domain="*splashlabs.com"/>
<allow-access-from domain="localhost"/>
</cross-domain-policy>


What's strange is that my other project does the exact same thing (pulls data from the server while running on localhost), and it works just fine. I wonder if it's some kind of project setting I need to fix.

Thanks for the suggestions! I'll keep playing around with it.

Best regards,
...aaron

neurotick
01-14-2008, 10:44 AM
<allow-access-from domain="*" to-ports="*" secure="false" />

dr_zeus
01-14-2008, 10:18 PM
Flash Player considers "localhost" a real domain and it is subject to the same security restrictions as any other domain. If you want your SWF at "localhost", but load from "example.com", then "localhost" must appear in the allowed domains in the crossdomain.xml at "example.com".

mooska
03-20-2008, 02:13 PM
Ill refresh that, had the same exactly problem.
The key word is
I had to recreate the project due to a flex builder error,
Its not crossdomain problem, couse in my case everything was fine, till importing project again into builder, after reinstall.
What I did was creating new project and moving classes into it, and it helped, but its about the options that where changed to default or smthng.

Some one know what option was it ? Some "allow net acces" or something similar ? compiler options ? project ?