• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1198
  • Last Modified:

AS2 *** Security Sandbox Violation ***

I am working locally when I see the following message:
*** Security Sandbox Violation ***
SecurityDomain 'http://www.abc.com/GetImage.aspx?type=thumb&file=/RAID1/webassets/abc/common/Logos/COV00003.jpg' tried to access incompatible context 'file:///C|/DesktopStuff/current%20working%20files/fundStaging55g.swf'

I never have an issue when the SWF is uploaded to the server, only when I am testing locally. AND nothing is wrong, it's just that the constant output to the output window makes it difficult to locate the output text I really want to see. (it happens a lot when I drag a dynamically placed image on the stage).

Is there any way to disable this message when I am testing locally? I am just publishing the file - I am not linking to a HTML documanet and testing.
0
msukow
Asked:
msukow
  • 4
  • 2
2 Solutions
 
CyanBlueCommented:
Add this in the frame 1 of your movie and see if it works for you...

   System.security.allowDomain(*');

CyanBlue
0
 
msukowAuthor Commented:
this is a 1 frame movie.

I added and still have the issue. I added the following:
System.security.allowDomain('*');

The code you sent looks corrupt on my end (first comma is odd)
0
 
CyanBlueCommented:
Hm...  That worked for me when I had that problem...  I ain't got a clue...  :(

CyanBlue
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
TanLiHaoCommented:
Uh that problem is with the Security Sandbox and CyanBlue is right :). However, here the thing is it may not be able to be solved, I'm not really sure how you got the error, haven't been getting such errors for a long time but I still know why this is happening.

Here's the problem, in a local filesystem .swf, this is specified in the publish settings of the .swf, it can only access files in your own filesystem and vice versa for whatever tries to access this. If the other option is selected in the publish settings, the .swf can only access the internet and only the internet can access the files.

When you upload to the server, no matter whether you chose the option use access local files only or access network only. The .swf will automatically only be allowed to access network only. In that case, you won't have any security sandbox error because your .swf is in the same domain as your.swf and they are both on the network.

So you might want to change the publish settings to access network only and your .swf should have no problem with errors anymore. If it still does, try testing the swf in the Flash IDE or Flex Builder (whichever you are using), it will have elevated privelege when you run the swf there. If there is still an error, the error should be with the domain issue, then all I can say is there is really no problem with your .swf.

Then you might wonder why some people don't have this issue, because it may be possible you are using absolute reference and people are using relative reference to URLs.

It seems that abc.com is always used whether you are uploading the .swf to a server or you are playing on your computer. Therefore, you might want to remove the absolute reference and use a relative reference. You will still get an error on your computer, because you do not have the ASP.NET pages running, if you want to get rid of the error, you have to be on a Server Machine to test and use relative references.
0
 
CyanBlueCommented:
Any update???

CyanBlue
0
 
msukowAuthor Commented:
It appears I have to live with this because of the way it is set up.
0
 
CyanBlueCommented:
Come to think of it, my trace bash command has "Security Sandbox" filtered out so I won't be seeing the lines that contains it...  So, yeah, I guess it is just the way it is unfortunately...  Luckily it only happens when you are developing...

CyanBlue
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now