Flash Webservices: Channel.Security.Error

Posted by druva | Flash, as3 | Thursday 16 October 2008 1:37 am

When Flex app retrieves data from a different server with httpservice.

It fails with the message:

Channel.Security.Error screenshot

The following unexpected error has occured:


 [FaultEvent fault=[RPC Fault faultString="Security error accessing url"
 faultCode="Channel.Security.Error"
 faultDetail="Destination: DefaultHTTPS"]
 messageId="8A12F18B-13A3-8D33-D013-5729A34FAC95"
 type="fault"
 bubbles=false cancelable=true eventPhase=2]

This is where crossdomain.xml come into picture.

you have to create a crossdomain.xml and host it on the data server domain root.

so flash player reads it first and then load the data request.


 <?xml version="1.0"?>
 <cross-domain-policy>
 <allow-http-request-headers-from domain="*"
 headers="*" secure="true"/>
 </cross-domain-policy>