3 Replies Latest reply on Nov 3, 2006 6:20 AM by peterent

    RemoteObject + Error + #2048

    ljonny18 Level 1
      Hi I am having troubles callin and using the “Remote Object” when I move my Flex 2 application from my Dev box to the server where I want to deploy it……

      I am calling a Remote Object that uses a CF CFC file. When it is all (my flex app and CFC file) are stored locally then the application runs and functions fine, but when I copy it to the server I get the following run-time error:

      faultCode:Client.Error.MessageSend
      faultString:’Send Failed’
      faultDetail:’Channel.Security.Error error Error #2048: Security sandbox violation:
      file:// …….. .swf cannor load data from http://localhost/flex2gateway/.’

      Any suggestions?

      Thanks
      Jon.
        • 1. Re: RemoteObject + Error + #2048
          peterent Level 2
          When you compiled your Flex app on your machine it used the service-config.xml file pointed to by the -services-config compiler option (Project->Properties->Compiler settings).

          That services-config.xml is using this line:
          <endpoint uri=" http://{server.name}:{server.port}{context.root}/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>

          where server.name is being taken as localhost, and the other values are being taken based on your machine (or CF configuration).

          You can either modify your compiler arguments to override these values (eg, -server-name= your server's name here, etc) or create a new destination in your machine's server-config.xml which is explicity for your server.

          <mx:RemoteObject destination="Coldfusion" ... This might be your local, development version
          <mx:RemoteObject desintation="CFServer" ... This might be your server

          The idea is that the SWF is built for a specific environment.
          • 2. Re: RemoteObject + Error + #2048
            ljonny18 Level 1
            Hi peter.... I am trying to create a new destination in the services-config.xml file, but when I add the "CFServer" destination and change my application accoringly, I get the following Error:

            faultCode:Server.Processing
            faultString:'No destination 'CFServer' exists in service flex.messaging.services.RemotingService'
            faultDetail:'null'

            any suggestions ... ?

            I have had no real joy searching this on the net either

            Jon.

            • 3. Re: RemoteObject + Error + #2048
              peterent Level 2
              You'll have to post the changes you make to the services-config.xml file or at least follow the pattern of the Coldfusion destination.