无法使Flash套接字策略文件正常工作 [英] Trouble getting Flash socket policy file to work

查看:341
本文介绍了无法使Flash套接字策略文件正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管我的Java应用程序回复了< policy-file-请求/> ,在Flash调试日志中列出(不知道有很多订单):




连接到192.168.1.86:4049暂停
- 不允许从 http://127.0.0.1:8888/Current/wander.swf



警告:在等待套接字
策略文件时,在
xmlsocket://192.168.1.86:4049(在3
秒)处超时。这不应该导致
任何问题,但请参阅
http://www.adobe .com / go / strict_policy_files
作为解释。



错误:请求
的资源xmlsocket://192.168.1.86 :4049由
requestor from
http://127.0.0.1:8888 /Current/wander.swf
由于缺少策略文件
权限而被拒绝。


我不明白的是,服务器(端口4049)接收到请求,输出策略文件(附加空字节),然后关闭连接,肯定它不应该超时?

我使用的政策档案是:

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


解决方案

Alex,
需要做。我不认为规范实际上表明你需要这些东西,但我似乎无法通过套接字政策文件例外,直到我已经完成。


  1. 听取端口843上的< policy-file-request /> 调用,并以相同的方式响应就像你在4049端口上做的那样。

  2. 把http跨域策略放在 http://192.168.1.86/crossdomain.xml / li>

这里有更多的细节: http://www.adobe.com/cn/devnet/flashplayer/articles/socket_policy_files.html



<但是我想你已经读过了。


Basically I'm using Flash to connect to a Java server.

Despite my Java application replying to the <policy-file-request/>, in the Flash debug log it lists (not sure about the order as there are lots):

* Security Sandbox Violation *

Connection to 192.168.1.86:4049 halted - not permitted from http://127.0.0.1:8888/Current/wander.swf

Warning: Timeout on xmlsocket://192.168.1.86:4049 (at 3 seconds) while waiting for socket policy file. This should not cause any problems, but see http://www.adobe.com/go/strict_policy_files for an explanation.

Error: Request for resource at xmlsocket://192.168.1.86:4049 by requestor from http://127.0.0.1:8888/Current/wander.swf is denied due to lack of policy file permissions.

What I don't understand is, the server (port 4049) receives the request, outputs the policy file (appends null byte) and then closes the connection, surely it shouldn't time out?

The policy file I'm using is:

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

解决方案

Alex, Two things you might additionally need to do. I don't think the specification actually states that you need to have these things in place, but I can't ever seem to get past socket policy file exceptions until I've done them.

  1. Listen to <policy-file-request/> calls on port 843, and respond to them in the same way as you do on port 4049.
  2. Put an http cross domain policy at http://192.168.1.86/crossdomain.xml

There are more details here: http://www.adobe.com/cn/devnet/flashplayer/articles/socket_policy_files.html

... but I guess you've already read that.

这篇关于无法使Flash套接字策略文件正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆