1 Reply Latest reply on Nov 11, 2008 10:00 PM by mousumi_78

    security problem with virtual host

    mousumi_78 Level 1
      Hello,

      I am using flex builder3 and php5 to run an application built in codeIgniter 1.6.3 and flex. Problem is that I am using a virtual host to run codeigniter in browser. My doc root is htdocs\projects\FlexPHP . Here my flex files resides. In browser I can access it by giving following url : http://localhost/projects/FlexPHP/bin-debug/FlexPHP.html

      and I am accessing my php application in http://flexphp/ (path : htdocs\projects\FlexPHP\src\server-script)

      I am calling http service from flex ...

      <mx:HTTPService id="phpService"
      url=" http://flexphp/profile/ProfileMngr"
      resultFormat="e4x" result="showResult()" useProxy="false" showBusyCursor="true" />
      <mx:Button label="Call PHP" click="phpService.send()"/>

      and getting 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()

      I have placed cross-domain policy file in server-script folder as the urls are different but it didnt solve my problem.

      I have tried it with another virtual host which is not a codeigniter application , a simple php page returing a xml..working properly.

      Any help is appreciated. Thanks in advance.