Actionscript 3 闪光网匣断开

Actionscript 3 闪光网匣断开,actionscript-3,websocket,flash,flashdevelop,Actionscript 3,Websocket,Flash,Flashdevelop,我正在使用AS3WebSocket模块连接web套接字。当我在本地启动flash时,它运行良好(flash文件在全局设置中标记为受信任) 但当我用flash打开服务器页面时,它就不工作了我没有错误消息,只是在日志中“断开连接”。 WinServer2012、IIS、ASP.NET MVC4 以下是日志: ws init begin: ws://www.sample.biz/WsHandler.ashx?userId=5 Disconnected null[object WebSocket] 和

我正在使用AS3WebSocket模块连接web套接字。当我在本地启动flash时,它运行良好(flash文件在全局设置中标记为受信任)

但当我用flash打开服务器页面时,它就不工作了我没有错误消息,只是在日志中“断开连接”。

WinServer2012、IIS、ASP.NET MVC4

以下是日志:

ws init begin: ws://www.sample.biz/WsHandler.ashx?userId=5
Disconnected null[object WebSocket]
和代码:

function SYS_wsInit_begin():void
{
writeLog("ws init begin: " + ws_init_url);
trace(ws_init_url);
try
{
    websocket = new WebSocket(ws_init_url,"*");
    websocket.addEventListener(WebSocketEvent.CLOSED, handleWebSocketClosed);
    websocket.addEventListener(WebSocketEvent.OPEN, handleWebSocketOpen);
    websocket.addEventListener(WebSocketEvent.MESSAGE, handleWebSocketMessage);
    websocket.addEventListener(WebSocketErrorEvent.CONNECTION_FAIL, handleConnectionFail);
    websocket.connect();
}
catch (err:Error)
{
    writeLog("ws init failed: " + err.message + err.name);
}
}

function handleWebSocketClosed(event:WebSocketEvent):void
{
    writeLog("Disconnected " + event.message + event.target);
    trace("Disconnected");
}

function handleWebSocketOpen(event:WebSocketEvent):void
{
    writeLog("Connected");
    trace("Connected");
}

function handleConnectionFail(event:WebSocketErrorEvent):void
{
    writeLog("Connection Failure: " + event.text);
    trace("Connection Failure: " + event.text);
}
crossdomain.xml:

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

我还使用以下文件安装了套接字策略文件服务器:

<?xml version="1.0"?>
<cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFileSocket.xsd">
  <site-control permitted-cross-domain-policies="*" />
  <allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>


我能做什么?

哦,我已经解决了这个问题。 阅读之后,我试图用fiddler检查843端口,但我只得到了一个指向索引页的重定向


我检查了我的IIS配置。843端口上有一个绑定。删除绑定并重新启动套接字策略文件服务器后,Web套接字连接已建立

用于在unix终端或cygwin下检查策略服务器:
echo-ne'\0'| nc-v example.com 843