Solved

SWF accessing blazeds from another domain

Posted on 2012-03-15
3
492 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
print map entry 34 67
egit plugin on eclipse 8 62
hibernate example for saving data 19 37
eclipse buid path vs tomcat lib path 10 22
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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

808 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