1

This is the error message I get when I attempt to run a Adobe Flash Builder application on the server ColdFusion is on or another computer on the same network. I've edited the cross domain.xml file to include the correct domains and the error still comes up. Ive tried many of the solutions from similar questions on here and I keep getting the same error. How do I make this error go away?

Here is the full error message:

Send failed Channel.Security.Error error Error #2048 url: 'http://localhost/flex2gateway/'

I installed Charles Proxy and here is the reason why I'm getting the error:

URL: http://localhost/crossdomain.xml Status: Failed Failure: Connect: Connection Refused

How do I change it from "localhost" to the ip address of the server?

Green Developer
  • 187
  • 4
  • 18
  • if you are using SOAP, you need this that is the most common cause of that error I've seen – Jason Reeves Dec 03 '12 at 20:36
  • Are you building a browser based application? Do you have a CrossDomain.xml file in place on the server you're trying to access? I think @JasonReeves was recommending that line goes in your crossdomain.xml file; but I'm not completely sure. – JeffryHouser Dec 03 '12 at 20:50
  • yes I was.. when using SOAP that entry has to be in the crossdomain.xml file also to allow the SOAPAction header to work. If it isn't there.. it throws that error. Might not be Green's issue but it is a very common cause of that error – Jason Reeves Dec 03 '12 at 21:43
  • I am not using SOAP. This happens wether I'm using a desktop application or a browser application. The crossdomain.xml file is located on the ColdFusion server under the "wwwroot" folder. Ive never moved it but I have modified it a few times with no success. – Green Developer Dec 04 '12 at 13:10

1 Answers1

1

You can see with Charles or HTTPAnalyzer if and where your new crossdomain.xml file is requested. It is very easy to place crossdomain.xml in wrong place if you are using multiple servers.

user1875642
  • 1,303
  • 9
  • 18
  • I haven't moved the cross domain.xml file from its original location in the wwwroot folder on the ColdFusion server. Is it supposed to go somewhere else? – Green Developer Dec 04 '12 at 13:11
  • wwwroot is the correct location.I've just seen that your url is _http://localhost/flex2gateway/. If you are launching your app from different computer, than url shall contain not 'localhost'. I guess that crossdomain file has no influence on desktop app, but you said that it throws same exception. – user1875642 Dec 04 '12 at 13:58
  • How do I change it from "localhost" to the IP address of the server? – Green Developer Dec 04 '12 at 14:24
  • If you are using desktop version, then you shall hardcode it somewhere. In web version you can use URLUtil to extract necessary parameters from your application's 'url' property.(like FlexGlobals.topLevelApplication.url). Host for crossdomain is always taken from the request which you try to send. So, if you try to load something from microsoft.com, it will try to load crossdomain from 'microsoft.com/crossdomain.xml' – user1875642 Dec 04 '12 at 14:25
  • Thats confusing. There isn't a place where I just change it? Im new to this stuff and that seems way beyond what I can do right now. – Green Developer Dec 04 '12 at 14:32
  • Try to search for 'localhost' in your project and replace it where needed. – user1875642 Dec 04 '12 at 14:34
  • `localhost` wasn't found in my project anywhere. – Green Developer Dec 04 '12 at 14:38
  • http://stackoverflow.com/questions/7974783/channel-security-error-error-2048 what about that answer? Or about http://stackoverflow.com/questions/3999177/flex-amfphp-actionscript-error-2048 that? – user1875642 Dec 04 '12 at 15:05