Quick Tip: AIR 2.5 & Security.loadPolicyFile()

After switching my AIR application into new AIR 2.5 SDK, boom! Every single URLRequest threw an IOErrorEvent. No other exception thrown. So I started digging in in order to find the cause and it appeared to be Security.loadPolicyFile() execution (I am reusing some libs containing these lines) that blocked it all quietly. First I tried to do try-catch block over it, but with no success. Than I just removed the lines for AIR project and voilà, everything back to normal again. URLRequests works again. It seems like AIR does not need loadPolicyFile() for URLRequests at all. Interesting that these loadPolicyFile() were targeting total different domain and were able to break any other requests.

1 comment so far

  1. hg February 26, 2011 21:13

    Thank you very much for this post. Tis has been bothering for weeks. A very strange issue indeed. Cheers!

Leave a comment

Please be polite and on topic. Your e-mail will never be published.