Flash套接字跨域安全问题 [英] Flash Socket Cross Domain Security Issue

查看:374
本文介绍了Flash套接字跨域安全问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用socket做了我的flash FTP传输,但是当它放在HTML文件中我得到跨域错误,我尝试了各种可能性,但失败。请帮助我,如果有人知道如何做闪存as3套接字策略。

I made my flash FTP transfer using socket , but when putting it in HTML file i am getting cross domain error, i have tried with various possibilities but failed. Please help me if anybody know how to how to do socket policy in flash as3.

我的文件放在我的ipaddress的根,我尝试了以下选项
1)Security.loadPolicyFile('xmlsocket:// ipaddress:80 / crossdomain.xml');
with 80 port

My file is placed at root of my ipaddress and I have tried with following options 1) Security.loadPolicyFile('xmlsocket://ipaddress:80/crossdomain.xml'); with 80 port

2)Security.loadPolicyFile('xmlsocket://ipaddress/crossdomain.xml');
没有提及任何点

2) Security.loadPolicyFile('xmlsocket://ipaddress/crossdomain.xml'); without mentioning any point

3)Security.loadPolicyFile('xmlsocket:// ipaddress:diffport / crossdomain.xml');
尝试不同的端口

3) Security.loadPolicyFile('xmlsocket://ipaddress:diffport/crossdomain.xml'); trying with different port

感谢在前进,Meghana

Thanks in Advance, Meghana

推荐答案

要使用闪存为套接字服务器验证服务器策略,请删除文件名:
Security.loadPolicyFile('xmlsocket:// ipaddress:port');

To validate a server policty with flash for a socket server, remove the file name: Security.loadPolicyFile('xmlsocket://ipaddress:port');

假设您的服务器侦听给定的端口并返回安全策略。
然而,你给的端口(80)是http端口,所以它可能不是有效的(用于http请求)

It assume that your server listen to the given port and will return the security policy. However the port you given (80) is the http port, so it may not be valid (used for the http requests)

这篇关于Flash套接字跨域安全问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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