Solved

SWF accessing blazeds from another domain

Posted on 2012-03-15
3
487 Views
Last Modified: 2012-04-11
We have a pure as3 - no flex - swf that we wish to connect to our BlazeDS back end.  We know that the swf works, and that it does connect to the back end.  However, we have recently moved only the swf to a different server, and it is no longer accessing BlazeDS correctly.  This is the error we are getting when we try:

[ChannelFaultEvent faultCode="Channel.Security.Error" faultString="error" faultDetail="Error #2048 url: 'http://ourdomain:port/blazeds/messagebroker/amf'" channelId="my-amf" type="channelFault" bubbles=false cancelable=false eventPhase=2]

where ourdomain and port are obviously replaced with the correct values.  

The endpoint url in services-config.xml is not hard coded, it is set to http://{server.name}:{server.port}/ etc.  We have tried setting the crossdomain xml to allow all, and are still getting this error.  How can we make the swf conncet to our BlazeDS again from any server we house it on?
0
Comment
Question by:anotherfn
3 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 37749961
Use crossdomain.xml and set System.allowDomain("*");


http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html
0
 

Author Comment

by:anotherfn
ID: 37765206
We've got a crossdomain policy xml file already set to allow all domains, and yet this still isn't working.
0
 
LVL 8

Accepted Solution

by:
section25 earned 500 total points
ID: 37767865
My cross domain policy didn't start working until I added the third line. Copy and paste this one and see if it works for you too.


<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
    <site-control permitted-cross-domain-policies="all" />
    <allow-access-from domain="*" />
    <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

Also, make sure this is at the root of the site.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now