Has anyone learned any more about this issue or come up with a solution?

 

I am experiencing a very similar problem: images loaded from another domain are generating Security Sandbox Violations of the form:

 

*** Security Sandbox Violation ***

SecurityDomain 'http://host1/foo' tried to access incompatible context 'http://host2/bar/thumbnail?width=40&height=52&id=pap'

 

It does not appear to be the mere loading of these images that causes this warning. It is applying effects and accessing properties. This is true even if I wrap the Image in another component like a Canvas that I then act on.

 

Usually, the behavior of the app does not work when this error is produced but sporadically, in the same application instance with the same images, the behavior does work while still generating these errors.

 

Very puzzling.

 

Alon

 


From: Kristopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Friday, March 25, 2005 10:42 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Security Sandbox Violation when loading image

 

I'm trying to load some images from a different domain than the one my Flex app lives on. When I do, the debugger prints out a bunch of errors like this:

 

*** Security Sandbox Violation ***

SecurityDomain 'http://myserver.com/index.mxml?debug=true' tried to access incompatible context 'http://otherserver.com/someImage?wid=30'

 

(Note, the image is dynamically generated and the URL should not include ".jpg")

 

Despite the errors, my images still seem to load in successfully, both through the Flex Builder IDE and when viewed directly in IE. Or so I thought.

 

The weird thing I've discovered is that if my image paths are brought into my Flex app via an XML file, then I do get the errors above, but the images do load successfully. However, if my image paths come in as a result of a remote object call, I get the same errors and my images DON'T load successfully. I've double checked the exact path's that are being used in both situations by tracing out the path immediately before it is used as the value for the "source" property of the <mx:Image> tag and it is EXACTLY the same in both cases.

 

So I have questions. First, why do I get those error messages? Secondly, if there really is a security sandbox violation, why do the images load successfully under the conditions I mentioned above? And finally, how do I prevent these violations from occurring in the first place?

 

Thanks for any insight you can provide.

 

Kris

 

--

 

Kristopher Schultz

Developer

 

Resource Interactive

p: 614.410.2123




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to