Welcome Guest, Not a member yet? Register   Sign In
Problem in Flex HTTP Service with codeIgniter
#1

[eluser]mousumib[/eluser]
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-de...exPHP.html

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

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\projects\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\src\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.

Any help is appreciated. Thanks in advance.
#2

[eluser]Renard Urbain[/eluser]
Did you try to place the cross-domain policy file on your flex's files root ?
#3

[eluser]mousumib[/eluser]
Yes..that too didnot work. I have tried to use another file from same virtual host where flex code resides then its working...but whenever i tried to access a file from diff. virtual host which contain codeigniter frame work its not working..
#4

[eluser]Renard Urbain[/eluser]
Are you using mod rewrite ? If it is the case then it must rewrite the url to a controller Smile

Try to modify the line where it says "RewriteCond $1 !^(index\.php|images|robots\.txt)" and add "crossdomain\.xml" maybe it will do the trick ?
#5

[eluser]mousumib[/eluser]
thanks a lot.. it worked..RewriteCond $1 !^(index\.php|images|application|uploads|robots\.txt|crossdomain\.xml) in htaccess file.




Theme © iAndrew 2016 - Forum software by © MyBB