3 Replies Latest reply on Mar 15, 2008 8:19 AM by MsCOpernic

    Starting with Flex

    MsCOpernic
      I builded a small application that retrieves data from an xml file. It works perfectly in my local machine but in the server, I get the following error:

      [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:216
      at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49 ]
      at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]
      at DirectHTTPMessageResponder/securityErrorHandler()[E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\DirectHTTPChannel.as:368]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/redirectEvent()

      What am I missing?

      Thanks in advance,
      JP
        • 1. Re: Starting with Flex
          Michael Borbor Level 4
          How do you connect with your xml file?
          • 2. Re: Starting with Flex
            Michael Borbor Level 4
            Here you'll most likely find the solution.
            http://www.judahfrangipane.com/blog/?p=113
            • 3. Re: Starting with Flex
              MsCOpernic Level 1
              Hi Mab, thank you for your answer. The link you posted is not available. Here is the code, it's just an adaptation of a sample:

              <?xml version="1.0" encoding="utf-8"?>
              <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="feedRequest.send()">

              <mx:HTTPService
              id="feedRequest"
              url="flex/xml/Embajadas_es.xml"
              useProxy="false"/>

              <mx:Panel x="10" y="10" width="544" height="338" layout="absolute" title="{feedRequest.lastResult.rss.channel.titulo}">

              <mx:DataGrid x="20" y="19" width="485" id="dgPosts" dataProvider="{feedRequest.lastResult.rss.channel.embajada}" height="228">
              <mx:columns>
              <mx:DataGridColumn headerText="Embajada" dataField="nombre" width="20"/>
              <mx:DataGridColumn headerText="Dirección" dataField="direccion" width="60"/>
              <mx:DataGridColumn headerText="Teléfono" dataField="telefono" width="20"/>
              </mx:columns>
              </mx:DataGrid>

              <mx:TextArea x="20" y="261" width="400" htmlText="{dgPosts.selectedItem.direccion}" height="19" borderStyle="none"/>

              </mx:Panel>

              </mx:Application>

              I tried both with an absolute URL and with a relative one (actual code) with the same result. Just in case, our server runs Windows Server 2003 and it is behind a firewall.

              Best regards,
              JP