Skip navigation
Currently Being Moderated

ftp Security Sandbox Violation?

Apr 16, 2012 1:57 PM

I have a crossdomain file and am trying to run the example at http://ntt.cc/2009/08/23/how-to-upload-files-in-flex-ftp.html but I keep getting a sandbox error.  All help is appreciated.  I am simply trying to allow users to upload images to a common folder, but I don't get permission to manage the folder unless the file is sent via ftp, so I am looking for a simple upload ftp client - which the test example looks like, using the ftp library - but can't get by the security.  The crossdomain file is below.  The common image folder is under the app folder.  Thanks.

 

SecurityError–>Error #2048: Security sandbox violation: http://myDomain.org/TEST/FlexFTP/FTPflex.swf cannot load data from ftp.myDomain.org:21.

 

The following statement is included in my Flex app.

 

Security.loadPolicyFile('http://www.myDomain.org/crossdomain.xml');

 

 

The crossdomain file:

 

<?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="*.myDomain.org" to-ports="*" />

<allow-access-from domain="ftp.myDomain.org" to-ports="*" />

<allow-http-request-headers-from domain="*" headers="*"/>

</cross-domain-policy>

 
Replies
  • Currently Being Moderated
    Apr 16, 2012 4:51 PM   in reply to EWN-CMI

    What is the url for the app and what url is it trying to access?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 20, 2012 5:12 AM   in reply to EWN-CMI

    I have the exact same problem. I try to connect to an FTP server by using sockets, everything works perfectly locally but I get the same error when I deploy and run it on the server.

     

    SWF location is http://spiix.dommel.be/restaurant/RestaurantSite.swf

    FTP location is spiix.dommel.be  on port 21

    crossdomain.xml location is http://spiix.dommel.be/restaurant/crossdomain.xml

     

    I even added

    Security.allowInsecureDomain("*");
    Security.allowDomain("*");

    to the code, to no avail.

     

    error :

    Socket security error : Error #2048: Security sandbox violation: http://spiix.dommel.be/restaurant/RestaurantSite.swf cannot load data from spiix.dommel.be:21.

     

     

    Any help would be apreciated (even disabling the entire security thing completely, in my case it doesn't have to be secure AT ALL).

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 20, 2012 10:23 AM   in reply to EWN-CMI

    Did you follow the instructions on socket policy files?

     

    FWIW, I’ve used AIR (which has different security rules).  I get occasional errors, but it works most of the time.

     

    -Alex

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points