views:

175

answers:

2

Hello, I have a web server application (based on python). Flash applications which are located at this server should connect to the server. The trouble is in crossdomain.xml.

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"&gt;
<cross-domain-policy>
 <allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>       

Here is this file (it's in the root directory).

The exact problem is that flash-applications don't load this file. Are there any ways to do this manually? For example, load it directly from flash-script or make up a new application at given port which will send this file to any connected socket.

+2  A: 

you're not closing the <cross-domain-policy> tag with </cross-domain-policy> - have you just forgot to copy/paste the last line? otherwise try that. also you might not need the DOCTYPE line and the to-ports="*" either.

we use this crossdomain.xml file and as long as it's in the root folder, it's worked fine for us every time

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

if it's an https domain and you want flash on non-https domains to access it you'll need to change the allow-access-from line to this

<allow-access-from domain="*" secure="false" />

one final thing worth trying is adding this line :

<allow-http-request-headers-from domain="*" headers="*"/>

but we've never had to use that for standard flash loading/saving via http.

oedo
This didn't help :(
Ockonal
just re-read your post, does this line 'Flash applications which are located at this server should connect to the server.' mean that the flash file is located at http://server.com/dir/flash.swf and the phython is also in http://server.com/someotherdir/python.py? if so you don't need crossdomain.xml and it will not be loaded by flash anyway. it's only used when the domain of the swf and the domain it's trying to access are different.
oedo
@oedo, same server but different addresses.
Ockonal
different domains? or just different addresses within a domain? also, what commands are you using in flash to load the data?
oedo
+2  A: 

can you run the SWF in a Firefox and use firebug or tamper data to see whether it does any policy file request at all? if so, move the file to the according directory.

greetz
back2dos

back2dos
What exactly I can see in firebug, for example? There is only get-request for the swf-file.
Ockonal