在MXML中访问URL的安全性错误

I am calling http service from flex ...

<mx:HTTPService id="personRequest" url="http://111.111.1.11/idesk/user.php/userinfo" useProxy="false" resultFormat="text" result="personJSON(event)" fault="anotherMethod(event)" method="post">
<mx:request xmlns="">
   <getPerson>"true"</getPerson>
</mx:request>
</mx:HTTPService>

and getting following error:

Security error accessing url

I have placed cross-domain policy file in server-script folder but it didnt solve my problem.

Any help is appreciated. Thanks in advance.

Try to use Charles to see of what flash trying to load. It will show if swf accessed crossdomain.xml from your server and correct path.

Are you loading from your file system? If so, you must be able to see in your address bar something like "file:// ..." If that is the case, the Flash Player will not allow you to connect to servers (even though you have configured your cross-domain.xml)

You have two possible solutions to solve this problem:

  1. Host your Flex Application in a web server (your address will look like http:[something])
  2. Add the -use-network=false in your Flex compiler arguments.

You can find more information about Flex Compiler arguments here

I hope this helps.