function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bulent703Bulent703 

Crossdomain.xml issues with flex app

Hi,

 

We have been using the flex toolkit for sometime and suddenly this week, our app stopped working. The error we get is:

 

Error: Ignoring policy file at https://na6.salesforce.com/crossdomain.xml due to meta-policy 'by-content-type'.

 

The contents of the https://na6.salesforce.com/crossdomain.xml file is as follows:

 

<cross-domain-policy>

<site-control permitted-cross-domain-policies="by-content-type"/>

</cross-domain-policy>

 

The content-type header of this file indicates that the file is text/xml. Now the by-content-type permitted domain policy indicates that the file is supposed to be sent out with the content-type header text/x-cross-domain-policy. So any access to this file is not even permitted. How can this work? 

 

Is anyone else having issues with flex apps on salesforce.com? Am I missing something here?

 

Update: Realized that the flex toolkit example will also not run if the swf file is hosted on a server other than Salesforce.com. The issue is that the flash would like to understand if salesforce.com is giving it the right to talk to the site and salesforce is somewhat responding back in a confusing way that prevents the remote site to access salesforce.com. This practically breaks all flex toolkit based meshups hosted on other sites.

 

Further Update: After further tests, it turned out that the $API.Partner_Server_URL_180 in visualforce page returned the following URL:

 

https://namespace.na1.visual.force.com/services/Soap/u/18.0/00D30000000YoRU

 

this made the flash plugin look for a crossdomain under this domain and get a 302 redirect. When this happens flash seem to lose the context and not able to use the crossdomain file loaded from https://na1.salesforce.com/crossdomain.xml. So, if I pass the URL as:

 

https://na1.salesforce.com/services/Soap/u/18.0/00D30000000YoRU

 

This works! This might be due to the Winter 12 update.

 

Thanks!

Bulent