2 Replies Latest reply on Sep 3, 2008 12:40 PM by stephan.k

    Socket "Security sandbox violation"


      Using flash cs3, scripting in AS3.
      I have a .net application on the localhost listening on port 1090.
      My "publish -> settings -> local playback security" is set to "Access network only".
      1. When I try to connect I succeed.
      2. The listener side immediately receives 23 bytes of data (although I can't find any Socket.writeXXX() anywhere on the flash side).
      3. As soon as any data is sent from the .net side to the flash side I get:
      Connection to localhost:1090 halted - not permitted from file:///D|/Flash%20Projects/Polar/Games/Games.swf
      With a SecurityErrorEvent with the following text
      OnSecurityErrorError #2048: Security sandbox violation: file:///D|/Flash%20Projects/Polar/Games/Games.swf cannot load data from localhost:1090.

      I tried adding Security.allowDomain("localhost"); in my main script and in my connection class but that did not change anything.

      If anyone can please explain what's happening here?
        • 1. Re: Socket "Security sandbox violation"
          Holtzer Level 1
          OK, so now I understand a bit more, and I figure I need a policy file.
          I tried placing an crossdomain.xml file to where my .swf compiles to. Reagrding that, it failed to get it with:
          "Ignoring policy file with incorrect syntax: xmlsocket://localhost:1090"
          I tried calling Security.loadPolicyFile("file://crossdomain1.xml") where crossdomain1.xml has the folllowing content:

          <?xml version="1.0"?>
          <allow-access-from domain="*" to-ports="1090" />

          It didn't say anything about it nor did it change the errors I got before.
          It appears the 23 bytes I was talking about in the previous post are the player's attempt to get a policy file from the socket I connected to itslef.

          This is driving me mad, can anyone please shed some light?
          • 2. Re: Socket &quot;Security sandbox violation&quot;
            stephan.k Level 1
            I know this is an old post... but did you ever figure this one out? I'm currently developing something with a few php scripts on my local machine and have the same issues...

            any insight appreciated.

            Thank you