Debuging Flex remoting to ColdFusion

Submitted by Falken on
Apparently nowhere else is this mentioned, but if you get errors from Flex 2 applications saying :

[MessagingError message='Unknown destination 'ColdFusion'.']' faultDetail:'Couldn't establish a connection to 'ColdFusion'

One of the first things you might try is opening up the services-config.xml you compiled against, and finding the part of the channel definition that says:

uri="http://{server.name}:{server.port}{context.root}/flex2gateway/"

and setting actual name, port and context root values there. Then recompile and try again.
You can double check the URL is right by leaving the final slash of, and seeing if you get a '500 No configured channel has an endpoint path' error when you try it in your web browser.

OK, so I use mxmlc to compile on the command line, but I still have a fairly normal name-based virtual host setup, and Flex wasn't clever enough to guess the correct values. Actual milage may vary.

If you still get nothing, consider digging out wireshark (was ethereal) and seeing what is actually going past - maybe there is a network issue of some sort.

In other news, I get a 30% speed increase on my compiles if I add '--incremental=true' to my mxmlc command line (down to 20 seconds now !). Which is nice.