2 Replies Latest reply on Sep 3, 2009 6:24 AM by molocco

    FTP Security




      I'm trying to upload files by ftp using sockets with Air. I've a php serving a crossdomain file in the port 843. But I'm still getting:


      Error #2048: Security sandbox violation: app:/app.swf cannot load data from ftpserver:port


      I'm doing: Security.loadPolicyFile("xmlsocket://domain:843");


      but I don't know if I missing something.


      any idea?



        • 1. Re: FTP Security
          Jeff Swartz Level 3

          You need not call Security.loadPolicyFile() for content in the AIR application sandbox.


          What code is causing the exception to be thrown?

          • 2. Re: FTP Security
            molocco Level 1

            I'm creating a socket connection first, and then executing PASV to enter in passive mode. I'm uploading files by ftp and this it's working (the file it's uploaded) but the follow code throw the exception:


            var info:PassiveSocketInfo = parseFromResponse(pasvResponse);
            var socket:Socket = new Socket();
            socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function (event:SecurityErrorEvent):void


            socket.connect(info.host, info.port);


            I'm using the maliboo ftp code (http://maliboo.pl/projects/FlexFTP/)


            Thanks in advance