3 Replies Latest reply on May 19, 2006 1:59 AM by Anjali_Bhardwaj

    How to..

      Hi I'm new to flex and still trying to figure out what is what

      I've got this in my main flex file

      <mx:RemoteObject id="roleTitle" destination="ColdFusion" source="Roletitle_example.CF.RoleTitle" showBusyCursor="true" />

      <mx:Panel width="50%" height="100%" layout="vertical" title="Role titles" id="panel1">
      <mx:DataGrid width="100%" height="90%" dataProvider="{roleTitle.getAll.result}"
      id="dgItem" >
      <mx:DataGridColumn headerText="Role title" dataField="sJobTitleName" />
      <mx:DataGridColumn headerText="Code" dataField="sJobcode" />
      <mx:DataGridColumn headerText="Disipline" dataField="sIndustryName" />
      <mx:Button id="pbGridLoadSearch" label="Load" click="roleTitle.getAll();" />

      but I keap getting this error and I don't know what it means.
      [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Security.Error error Error #2048: Security sandbox violation: file:///C|/Inetpub/wwwroot/Roletitle%5Fexample/main.swf may not load data from http://localhost/flex2gateway/."
      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/dispatchEvent()
      at mx.messaging.channels::NetConnectionChannel/::defaultErrorHandler()
      at mx.messaging.channels::NetConnectionChannel/::securityErrorHandler()
        • 1. Re: How to..
          This is a security error. I guess you'll need to trust the location. Rightclick on any opened swf. Goto settings- >Advanced -> Global Security Settings Panel and add the location there to trust it.
          • 2. Re: How to..
            xY9-zf Level 1
            ok is there anotehr wa to see that the data is getting to the flash file
            My page loads up and says getting data from localhost... but no data is being displayed in my grid

            • 3. Re: How to..

              Are you running your swf from a C: drive based path or web based path ( http://localhost....). I would suggest that you load main.swf from the web based path.

              There are some security restrictions which do not allow a swf to access data from a domain different from the location of the swf. Also if the swf needs any data file, please keep the file in the same directory as the swf.

              You can debug data loading by adding the following to the mx:RemoteObject declaration.

              fault="Alert.show(event.fault.faultstring), 'Error'"
              result="Alert.show(event.result), 'Result' "

              Anjali Bhardwaj
              Flex SDK Development Team