Shaun Mccran

My digital playground
 
23
J
U
L
2010

Flex webservices security error accessing url

I've been working with some client side flash developers recently and we came across an unusual error that was being thrown in a Flex application when we were sending a webservice request to a Coldfusion server.

The error was "Security error accessing URL". I thought I'd overcome this a long time ago by using the cross-domain.xml file to allow server access to services.

It appears that there is a security issue with Flash 9 that requires the following line to be added to the CrossDomain.xml file:

view plain print about
1<allow-http-request-headers-from domain="*" headers="SOAPAction"/>

I'm guessing that it is enabling access for SOAP requests to any remote services on that server.

 
28
J
U
L
2009

Finding the system file storage in AIR

When progamming an AIR application, you may want to make use of the applicationStorageDirectory available via the flash.filesystem package to store temporary files/folders. You can find where your system is storing these files by doing something like the following:

view plain print about
1var f:File = File.applicationStorageDirectory.resolvePath("Test.txt");
2trace(f.nativePath + ' is where my file is stored');

This will give you an absolute path to the local system file storage location. Handy for multi platform applications, as Pc and MAC based systems will use different default storage directories.


This content is purely my opinon, any offence or errors are unintentional, please comment your views appropriately
Site Credits
Aggregated by ColdfusionBloggers.org Powered by Coldfusion

Technology & Science Blogs - BlogCatalog Blog Directory Blog Directory & Search engine