2 Replies Latest reply on Dec 10, 2006 7:01 PM by Cheree Singal

    Sandbox security violation error on compiling FDS

    Cheree Singal
      Hi,
      I am trying to compile am mxml using Remote Object locally using Flex SDK outside FlexBuilder.
      I have used the command:
      mxmlc -services="path\to\my\services-config.xml" -context-root=\ContextRoot FileName.mxml

      I am getting the following error when I try to run the swf generated:

      [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Security.Error error Error #2048: Security sandbox violation: http://localhost:9080/iReports/flexFiles/mxml/AdminServices.swf cannot load data from http://localhost:9080iReports/messagebroker/amf."
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()
      at mx.rpc::Responder/fault()
      at mx.rpc::AsyncRequest/fault()
      at mx.messaging::ChannelSet/::faultPendingSends()
      at mx.messaging::ChannelSet/channelFaultHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.messaging.channels::NetConnectionChannel/::defaultErrorHandler()
      at mx.messaging.channels::NetConnectionChannel/::securityErrorHandler()


      Can anybody help me?

      Thanks in advance,
      Cheree
        • 1. Re: Sandbox security violation error on compiling FDS
          slaqua
          Hi Cheree,
          I struggled with a similar problem and I believe the first thing you should try is to setup a cross-domain policy.
          I found this in the Adobe Flex2 - Training from the Source book and it says that you need a file called " crossdomain.xml" inside the root of your webserver - where the Flex app is running.

          The file needs to look like this:
          <cross-domain-policy>
          <allow-access-from domain="*"/>
          </cross-domain-policy>

          Again, I assume you can also restrict access to specific domains by putting some IP's in the specific tag, but I would start with this *.

          Somehow I feel that will resolve your problem, as it is usually these security sandbox problems that appear with cross-domain access issues.

          regards and good luck,
          Sven.
          • 2. Re: Sandbox security violation error on compiling FDS
            Cheree Singal Level 1
            Hi Sven,
            Thank u so much for replying.
            I ll definitely keep in mind what u told.
            But my current issue is solved. The problem was:

            [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Security.Error error Error #2048: Security sandbox violation: http://localhost:9080/iReports/flexFiles/mxml/AdminServices.swf cannot load data from http://localhost:9080iReports/messagebroker/amf."

            If u observe in the error message, the server was trying to load '9080iReports', not '9080/iReports'. This is because I was giving -context-root=\ContextRoot instead of -context-root=/ContextRoot.
            So, a silly mistake of using a back slash instead of forward slash.

            Thanks again,
            Cheree