Flex 无法识别 crossdomain.xml 策略文件
我正在使用 Flex 3,并且想要访问另一台服务器上的 Web 服务。我已将 Web 服务(数据 -> 导入)成功导入到我的应用程序中,但是当我访问代码本身中的函数时,出现以下错误:
警告:域 ... 未指定元-政策。应用默认元策略“全部”。 此配置已弃用...
错误:由于缺乏策略文件权限,来自...的请求者在...处的资源请求被拒绝
安全发送箱违规
连接到...已停止 - 不允许...
我已将“crossdomain.xml”策略文件放在安装 Web 服务的服务器的根目录中。这是该文件的内容:
<!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>
我在代码中调用了 Security.loadPolicyFile() ,但仍然收到此错误。有什么建议吗?
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
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试试这个:
Try this:
您可以检查一下在请求 crossdomain.xml 文件时是否没有收到 404 错误吗?如果您要获取 xml 文件,只需在浏览器中输入 http://servername:port/crossdomain.xml在浏览器中而不是 404。
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.