ActionScript 3.0 :: Socket Connection Cross-domain - "Error #2048"
Feb 3, 2009
I made simple java server on one pc and tried to contact it from another pc on LAN from localhost, so far so good, it worked flawlesly. But when I want to contact the java server outside the security sandbox(from webpage), it will throw me an error:
[Code].....
View 1 Replies
Similar Posts:
May 13, 2009
This is my first entry in this forum but I already found a lot of answers by browsing it.However, altough many references seem to solve the problem I'm hurting on, it doesn't seem to work for me...Now, here's the case:I made a flash web site that will be hosted on an external web server (let's call it serverMy flash needs to get some info from my internal server don't have access to the root, only to the folder «myfolder» so my website reads like this
View 1 Replies
Feb 11, 2009
I have the following:
PLAYER.SWF -- contains flv player and controls.
cross-domain-policy.xml -- that allows everything.
www.yoursite.com[code].....
If I have all the files on the same domain, everything works. The swf is designed to look for the prefs.xml file at whatever location where the html page is. I can have the swf in a location like[url]... and have everything else in some other funky location on that domain. If I try to have the html page and prefs and stuff on another domain, it can't read from the prefs.xml, and I get the Error #2048. From my research, this is a cross-domain issue, but I have cross-domain policies all over the place and it's still doing it.
View 1 Replies
Feb 11, 2012
I have a simple IRC socket that is used to communicate with servers for a web-based IRC client. Unfortunately, attempting to connect to a network results in a security error. I read up on sandboxes and their appropriate permissions, and then used Security.sandboxType to get the sandbox of my socket, which came up as remote. After reviewing the documentation, I still don't fully understand how I can enable my socket to connect to a remote IRC server. I tried Security.allowDomain,
View 1 Replies
Jan 15, 2009
I have created a socket server on port 6666 because port 843 is in use on my mac.So when flash player request "policy-file-request" I return to it the cross domain xml, but I keep getting the security error that "cannot load data from".[code]As you see I receive the cross domain from the socket server.But I don't understand why flash player doesn't accept that?xmlsocket.connect("localhost", "6666");Does anybody have any idea why it throws that error "cannot load data from" ?
View 0 Replies
Jun 9, 2011
I have an application that connects to a binary socket server running on port 2234. I use the python policy file server, which I downloaded from [URL], which runs on port 843. If the client app is trying to connect to a socket I can see that the server is receivng the request for a policy file and that it sends it to the client. However, in the client, I get a security sandbox error. How is this possible? And is it possible to check whether the client really received the policy file? BTW, here is my policy file:
<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd"><cross-domain-policy><allow-access-from domain="*" to-ports="*" /></cross-domain-policy>
View 3 Replies
Apr 27, 2010
i got a problem with 'Security error',it happens when i try to connect my XMLSocket (Flex) with my Socket (Java)i have a domain:
alucardeck.mine.nu
i startup my apache tomcat 6.0 and in ROOT folder i have:
policyFile.xml and crossdomain.xml
(i had a doubt about what is the correct filename so i created both)both files contains:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
well, yes, you can access using the default port 80, as it should be.(but probably my server will be down when u try to access it)so here is what i do: i run my Java server application.there i open 1 socket in port 19809.(i already tried with port 843 too) then, i run my Flex application: [URL]also i tried to run it in ROOT folder..the XMLSocket class is instanced like this:
xmlsock = new XMLSocket();
// add all listeners
Security.loadPolicyFile("http://alucardeck.mine.nu/crossdomain.xml");
// also tried "xmlsocket://alucardeck.m....
[code]....
i also notice when i start my Java Server application with 2 sockets listening ports: 843 and 19809, i notice Flex first try to connect to 843 and then 19809, and in both sockets i reply with that String from before.
View 1 Replies
Feb 21, 2011
I am trying to connect to a public resource using actionscript. I already have a PHP site set up to do this, but wanted to move it to Flash. From what I have read, Flash absolutely requires the destination location to have a crossdomain.xml file referencing the remote SWF. This seems absolutely ridiculous.
If I am correct, this means that public resources such as RSS feeds cannot be accessed using Flash? Is there any possible way to access a public file (like RSS) remotely from a SWF without having access to the destination server's crossdomain.xml file? I've tried using Socket and URLRequest, both giving the same "sandbox violation" error.
View 1 Replies
May 4, 2011
I have been developing an application(a website to be more precise) which consists of a flex front end which is constantly sending and receiving data from the back end which is programmed in java. The connection between the two components is being done through blazeds. This worked fine while I was running it locally, however when I uploaded both sides of the application to a tomcat server(online) the following error is being returned when a connection between the components should occur:URL...I have read around about this error and many seem to getting this error when making connections between different servers, unlike here, where the connection is occurring within the same server.
View 1 Replies
Nov 5, 2010
My swf works fine when previewed locally but because of flash cross domain issues (link below) doesnt work live. [URL] Ive used a 'crossbrowser.php file to .load in xml but am not having success with the sendAndLoad command. [URL]
View 3 Replies
Oct 28, 2009
I am trying to emulate (in a limited way) the behavior of JavaScript's XMLHttpRequest object through Flash/ActionScript 3, in order to overcome the same-domain limitation. But I'm discovering that ActionScript has its own limitations in that regard. I admit that I might be mistaken, but from what I understand it is theoretically still possible to do this sort of cross-domain scripting using ActionScript, so long as you get all the permissions right. And that's where I'm running into trouble.
First, I borrowed some open-source code for a class called AjaxRequest, which I have saved as /ajax/AjaxRequest.as. I then created a Flash file called /jsajax.fla which exports to the final SWF file, /jsajax.swf. Now, here's the ActionScript code that comprises the first and only frame of the Flash file:
import ajax.AjaxRequest;
Security.allowDomain("domainone.com");
Security.allowDomain("domaintwo.com");[code]....
This is the only case I could not get working, and this is the case I need to get working. The first two were really just test scenarios to see if the script was working at all. When I try to run my jsAjax function here, I wind up with an error that shows up twice in Firebug:
uncaught exception: Error calling method on NPObject! [plugin exception: Error in Actionscript. Use a try/catch block to find error.].
uncaught exception: Error calling method on NPObject! [plugin exception: Error in Actionscript. Use a try/catch block to find error.].
View 1 Replies
Dec 17, 2010
I'm trying a simple tutorial of retrieving RSS feeds from yahoo and keep getting this error: RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP" I've seen some articles that say I need a crossdomain.xml file, but I don't really know how to set this file up and how to use it from the Flex SDK compiler (mxmlc).
View 1 Replies
Jun 17, 2011
I have a SWF file which is on suppose [URL] and I have an cross domain file
[Code]...
I dont know that happend. When I user Firebug, the swf is looking for [URL] it is present there. But [URL] is not there(I can't put any corssdomain file there, because I dont have any access). The issue is image from (SESSION 1) is resizing and image from (SESSION 2) is not resizing on the COMPLETE Event.
View 1 Replies
Jun 2, 2010
We have a Flash application that is running within an HTML file.For one page we call a legacy reporting system in ASP.NET that is within an IFRAME. This page then communicates back to the Flash application using cross-domain scripting (document.domain = "domain" is set in both pages. Now the kicker. Flash has history tracking enabled.This loads the history.js file that created a div tag to store page changes so the back and forward buttons work in the browser.Which works for Firefox and Chrome as they create a div tag.In Internet Explorer, history.js creates another IFRAME (instead of a DIV) called ie_historyFrame.When the ScriptResource.axd code attempts to access this with:[code]At my wit's end on this one.We have users who need to use IE to access this site. They are big clients who we cannot tell to just use Firefox.
View 2 Replies
Jun 1, 2010
post the code for a working cross-domain securityfile that allows access only from the same domain as all the flashfiles and xml files are in?used to be easy in as2 but i think i dont know what i need to know about it in as3..
View 3 Replies
Jun 16, 2008
any one have a snip of code to allow the flash player to acess a cross domain policy file. i have one but its for as2 i tried it in as3 and it throws me errors.
View 4 Replies
Aug 4, 2010
I created an XML gallery in as3 that will be loading images from a different domain.
I have a .swf (swf1) on serverA that loads an XML from serverB. The XML on serverB points to the image locations located on serverB (I need to host the images on serverB because server A doesn't have enough room).
The images load fine from swf1 locally in Flash, but when I publish swf1 to serverA, the images do not load. My guess is that the XML on serverB is not being loaded correctly because I can see that swf1 on the webpage.
Here is how my XML is set up:
<?xml version="1.0" encoding="UTF-8" ?>
<images>
<image src="http://serverB/media/images/image.jpg" title="This is image 1"/>
</images>
[Code].....
View 2 Replies
Apr 10, 2009
I recently obtained two different domains that point to a subdirectory of another domain server. The swf file I created does not show up when I use the domains that are pointing to the subdirectory of the original domain.I placed an xml file into the root directory that contains the following code:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">[code]....
Nothing shows up. Is there something else I need to do make this work? I created the swf file using CS3.
View 5 Replies
May 1, 2011
What my swf (on mysite1.com) need to do, is that POSTing some php values from mysite1.com (paid hosting) to a file on mysite2.com (free hosting) and get the 100% of the html response. I've started this project in AS2 but I couldn't find a function that get the source of a website, so I recreate the project in AS3 with URLRequest and URLLoader. Everything went fine, I've finished the project, uploaded the file, and there comes the cross domain problem. I can't upload/modify any file on mysite2.com because I can only add pages/posts (like a blog). I've read at least 20 forums about this, but can't find the solution.
I know (from the manual) that in later versions of flash and/or AS, the swf file asked the user for permission (like now for the webcam). Is there a way to do this in as3 or any way to bypass the need of the crossdomain xml file? If no, what is that older flash version that can do this permission request or that don't need that xml, (but still can post to php files and get the whole response).
I'm really upset, because I worked a lot of hour on this, and I was so happy that I could finish it, but I didn't know that there is such a big difference in security between local and online swf files.
View 4 Replies
Nov 4, 2010
it's just not working for me I made a crossdomain.xml file that looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
i put that in the folder with the php file i want to access[URL]..
View 1 Replies
Dec 6, 2010
I have two swf files hosted on different domains [URL] and [URL]. a.swf is loading b.swf and trying to cast it to some interface. When both of these swf files are under the same domain everything works fine. But when they are under different domains I'm getting null after casting b.swf to the implemented interface IComponent. Both of these swfs are compiled with use-network=true and with the same IComponent.as.
[Code]...
View 5 Replies
Aug 11, 2009
I am currently building an XML Socket Server that I am running locally on my computer. My flash client I build as an executable that runs on your computer and connects to mine via port 9000. I want however, to be able to run the flash client as a .swf in a web page on my website. I have a security policy but I don't know if I am using it right. My server is extremely basic still, it has no admin controls or even authentication or anything, right now it just spits back what it is given essentially, while I test out things and stuff. I just don't know how to handle any cross browser stuff.
********************************************All my code works as is if the flash file is compiled as a .exe from any computer. I have tested that. It just doesn't work as a .swf in a web browser.********************************************The file currently is set to just have the user type in their name and then when they move their mouse, it shows up on all other clients with their names next it it. Basically testing a real time activity updates.Here is my code and other files:My config.xml file:
HTML Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<config>
[code]......
View 4 Replies
Dec 6, 2010
I'm making a flash-based website which would use some information from a separate domain to update its contents. The XML file (document.xml) rests under one domain (let's call it updater2.net), while the core site rests under another (e.g., coredommain.net). I looked at some literature and I picked the simpliest method utilizing this small .php file (called loadXML.php here) and the A/S excerpt:
[Code].....
View 4 Replies
Dec 12, 2010
does the cross domain policy has to be in the root of the website or can it be in any subdirectoy from which we wish to load images form another domain?
View 0 Replies
May 1, 2011
What my swf (on [URL]) need to do, is that POSTing some php values from [URL] (paid hosting) to a file on [URL] (free hosting) and get the 100% of the html response. I've started this project in AS2 but I couldn't find a function that get the source of a website, so I recreate the project in AS3 with URLRequest and URLLoader. Everything went fine, I've finished the project, uploaded the file, and there comes the cross domain problem. I can't upload/modify any file on [URL] because I can only add pages/posts (like a blog). I've read at least 20 forums about this, but can't find the solution.
I know (from the manual) that in later versions of flash and/or AS, the swf file asked the user for permission (like now for the webcam). Is there a way to do this in as3 or any way to bypass the need of the crossdomain xml file? If no, what is that older flash version that can do this permission request or that don't need that xml, (but still can post to php files and get the whole response).
The other problem is that I cant use a php file on [URL] like a proxy between the sites, because this thing I want to access on mysite2 is IP address dependent, so each different user of the flash file has to be "tracked" different. (like a visitor counter - if each user of the swf access mysite2 through a php on th first site, they are tracked as 1 user (because they are tracked with mysite1 IP address))
View 0 Replies
Oct 31, 2008
Alright, I was told that I need some sort of file on the domain hosting an FLV in order to load it from another domain. Is this true? If so, step by step, how would I go about loading this FLV if I were to say.... put it on newgrounds, and host the video myself. I've posted on the newgrounds forums, but that place is a joke.
View 1 Replies
Jan 12, 2010
Question: How do I create the ability to load a xml file from another domain?
For example, I am creating an embeddable video player that will play on the domain which the xml file resides and also embedded on other sites. I am to the point where the video player completely works on the domain that the xml file resides and when I embed it on another domain, the .flv plays but the xml data will not pull.
FYI, I have complete access to the domain where the xml file resides.
Here are some snippets of security settings that I have been trying to get to work:
Code from Player:
System.security.loadPolicyFile(domain + "data/crossdomain.xml");
Code from "data/crossdomain.xml":
<?xml version="1.0"?>
[Code].....
View 2 Replies
May 18, 2010
I'm getting an error:
Error #2048: Security sandbox violation: http://www.m.com/p/bin-debug/main.swf cannot load data from http://rateservice.m.com/rateservice.svc/.
My cross domain file at http:[url]....
<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"><cross-domain-policy><allow-access-from domain="*.m.com"/></cross-domain-policy>
using m as alias . how I'm gonna fix this as it should work. I done a firbug test and the cross domain is being found by lash in firebug
View 16 Replies
Dec 23, 2009
I was looking around but couldn't find it where can I add the cross domain policy of Adobe in Apache server. Because without it, its not letting me access my XML on another server.
View 1 Replies
Jan 25, 2010
As you might know, browser's security model does not allow a script loaded in a page from http:[url]... to make cross-domain requests (no AJAX calls to any other domain other than url...).The Javascript file itself could have been served from a different domain altogether (url....) and that is irrelevant. This is the Same-Origin Policy.
Flash also has something similar? But does Flash treat the origin to be the HTML page where the .swf file was loaded or origin is the domain which served the .swf file?
So http:[url]... loads a .swf file from http:[url].... Now .swf can load resources only from [url].... or only [url....? I'm assuming there are no cross-domain.xml files setup on either [url]....
View 1 Replies