Solved

SWF accessing blazeds from another domain

Posted on 2012-03-15
3
503 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

734 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