This content has been marked as final. Show 3 replies
Flex Builder does some magic that allows data access outside the security sandbox.
In all other cases, you will need a crossdomain.xml file on the server from which you are trying to access the data.
Ok, I created a crossdomain.xml file, and uploaded it to my server in the same folder as my swf, but I am still getting the error.
Here is the code for my crossdomain.xml file:
<!DOCTYPE cross-domain-policy SYSTEM " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"><cross-domain-policy><allow-ac cess-from domain=" http://MYSITE.com" /></cross-domain-policy>
With mysite.com being replaced by the initial directory of the site I am accessing obviously. Is there something I am missing in my crossdomain file? Do I need to add any code in my mxml file in flex?
The crossdomain.xml file needs to go in the *web server root* folder of the server from which you are requesting the data. Also, for testing, use the global accessibility "*". when that works, replace it with your real domain.
What is the web werver? IIS? If so then the file goe isn C:\Inetpub\wwwroot
That is the only one I am sure of. I fugured out where bu putting it in every folder i could imagine until it worked, then removed them till it broke!
No additional code is required on the client, that's all handled by the Flash
Here is more info on crossdomain files: