Flex异常 Channel.Connect.Failed error NetConnection.Call.BadVersion

今天在给项目搭环境的时候碰到一个问题,我把Web应用成功到部署到Weblogic上之后,无法访问Flex页面,没有任何Error,也不能访问任何资源。经过仔细排查,发现是有一个新增的SecureAMFChannel没有被注释掉,故改成使用本地开发环境使用一个AMFChannel。但是问题还没有解决,因为在登录之后Flex报异常如下:

[ChannelFaultEvent
faultCode="Channel.Connect.Failed"
faultString="error"
faultDetail="NetConnection.Call.BadVersion: : url: 'http://localhost:7001/test/messagebroker/amf'"
channelId="testAmf"
type="channelFault"
bubbles=false
cancelable=false
eventPhase=2]:
 Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: 'http://localhost:7001/test/messagebroker/amf'

 

访问 http://localhost:7001/test/messagebroker/amf,得到系统权限限制的消息。于是检查权限控制,发现是账户权限不对,加上权限之后问题解决,顺利进入系统。

 

最后,经Google,得到一个关于BadVersion异常的解释。

BadVersion usually means there's junk in the response, this would be caused
by warnings or error messages being output into the same stream as the
response body. The literal meaning of this message is that the Flash AMF
parser could not understand what's been sent to it.
Check for any code that may cause errors or warnings on the server side. I
use Charles Proxy for watching the AMF communication - it is not a free
program, but it has an evaluation version, that doesn't expire, but keeps
annoying you with "buy me" sort of messages. Actually, I think it's worth
the money, but, that's up to you.

你可能感兴趣的:(Flex)