开发者

Flex does not recognize crossdomain.xml policy file

I'm using Flex 3 and I want to access a webservice on another server. I've imported the webservice (Data->Import) succesfully into my application, but when I'm accessing the functions in the code itself I get the following error:

Warning: Domain ... does not specify a meta-policy. Applying default meta-policy "all". This configuration is deprecated ...

Error: Request for resource at ... by requestor from ... is denied due to lack of policy file permissions

Security sendbox violation开发者_Go百科

Connection to ... halted - not permitted from ...

I've put the "crossdomain.xml" policy file in the root directory of the server that the web service is installed on. This is the content of this file:

 <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
 <cross-domain-policy>
 <allow-access-from domain="*" secure="false" />
 </cross-domain-policy> 

I've called the Security.loadPolicyFile() in my code and am still getting this error. Any suggestions?


Try this:

<?xml version="1.0" ?>
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="master-only"/>
  <allow-access-from domain="*"/>
  <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>


Can you check if you are not getting a 404 when requesting for the crossdomain.xml file. Just type http://servername:port/crossdomain.xml in your browser if you are getting the xml file in the browser and not a 404.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜