Channel. Connect. Failed error netconnection. Call. badversion: URL: 'http: // localh

Source: Internet
Author: User

 

Error message:

Fault (MX. messaging. Messages: errormessage) #0
Body = (object) #1
Clientid = (null)
Correlationid = "3541add2-5245-3c38-a8b6-92dfc59da055"
Destination = ""
Extendeddata = (null)
Faultcode = "client. Error. messagesend"
Faultdetail = "channel. Connect. Failed error netconnection. Call. badversion: URL: 'http: // localhost/amfphp/gateway. php '"
Faultstring = "failed to send"
Headers = (object) #2
Messageid = "70675b80-508d-99f8-87b2-92dfca00b9d7"
Rootcause = (MX. messaging. Events: channelfaultevent) #3
Bubbles = false
Cancelable = false
Channel = (MX. messaging. channels: amfchannel) #4
Authenticated = false
Channelsets = (array) #5
Connected = false
Connecttimeout =-1
Enablesmallmessages = true
Endpoint = "http: // localhost/amfphp/gateway. php"
Failoveruris = (array) #6
Id = "My-amfphp"
Mpienabled = false
Netconnection = (flash.net: netconnection) #7
Client = (MX. messaging. channels: amfchannel) #4
Connected = false
Maxpeerconnections = 8
Objectencoding = 3
Proxytype = "NONE"
Uri = "http: // localhost/amfphp/gateway. php"
Piggybackingenabled = false
Polling = false
Pollingenabled = true
Pollinginterval = 3000
Protocol = "HTTP"
Reconnecting = false
Recordmessagesizes = false
Recordmessagetimes = false
Requesttimeout =-1
Uri = "http: // localhost/amfphp/gateway. php"
Url = "http: // localhost/amfphp/gateway. php"
Usesmallmessages = false
Channelid = "My-amfphp"
Connected = false
Currenttarget = (MX. messaging. channels: amfchannel) #4
Eventphase = 2
Faultcode = "channel. Connect. Failed"
Faultdetail = "netconnection. Call. badversion: URL: 'http: // localhost/amfphp/gateway. php '"
Faultstring = "error"
Reconnecting = false
Rejected = false
Rootcause = (object) #8
Code = "netconnection. Call. badversion"
Description = ""
Details = ""
Level = "error"
Target = (MX. messaging. channels: amfchannel) #4
Type = "channelfault"
Timestamp = 0
Timetolive = 0

The above error message is reported. This is the case after debugging for a long time. no error is reported when mxml is called internally, but this is called by other modules. this happens when mxml is used.

When I put the project on the internet server for testing, the test information can be returned normally, but the above error message is displayed during local debugging.
Amfphp on the internet is dragged on the same folder on the local machine. Therefore, such an error cannot be solved;

After a visit to the conference, I found a solution for amfphp1.9 error:

 

The solution for my local machine is to separate/$ gateway-> disablestandaloneplayer () according to the method below; comment it out and it will be OK!

 

(The following content will be transferred to the Apsara infrastructure management framework-background technical discussion board» solutions to new amfphp versions)

New version of amfphp 1.9

1. The access method fails in the Flash environment, but the built-in SWF debugging is normal. Modify amfphp \ gateway. php as follows:

If (production_server)
{
// Disable profiling, remote tracing, and service Browser
$ Gateway-> disabledebug ();
// Keep the Flash/flex ide player from connecting to the Gateway. Used for security to stop remote connections.
// $ Gateway-> disablestandaloneplayer ();
}

2. An error occurred while accessing the bytearray object. Modify amfphp \ core \ AMF \ IO \ amfserializer. php as follows:

Function writeamf3bytearray ($ D)
{
$ This-> writebyte (0x0c );
// $ This-> writeamf3string ($ D, true );
$ This-> writeamf3bytearraybody ($ D );
}

When writing PHP code, set AMF of amfphp to amf3. The flash setting is invalid. The code is $ globals ['amp'] ['encoding'] = 'amp3 ';
Or modify $ amfphp ['encoding'] = "amf0" in the amfphp \ core \ shared \ app \ globals. php content to $ amfphp ['encoding'] = "amf3 ";

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.