header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Srikanth
Points:0
Posts:0

5/26/2011 12:37:03 AM

Title: Security Sandbox error


I have my application(flex project) running on server(java) at
http://172.22.7.7:8080/myApp/hello.html

we have one more audio server in same system but at different port
172.22.7.7:9999

i have to intialize the socket connection between two of them.
bu when i call for
socket.connect("172.22.7.7","9999");

it throws security sandbox error...

i have crossdomain.xml in all folders of audio server

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>

<allow-access-from domain="172.22.7.7"/>

</cross-domain-policy>

still i get error...in debugger console

Trying to connect to localhost
Warning: [strict] Ignoring policy file at xmlsocket://172.22.7.7:9999 due to incorrect syntax. See http://www.adobe.com/go/strict_policy_files to fix this problem.

*** Security Sandbox Violation ***
Connection to 172.22.7.7:9999 halted - not permitted from http://localhost:8080/myApp/hello.swf
Error: Request for resource at xmlsocket://172.22.7.7:9999 by requestor from http://localhost:8080/myApp/hello.swf is denied due to lack of policy file permissions.


if any one knows solution for this.. please let me know



1
Inder
Points: 2980
Posts:0
5/26/2011 11:25:30 AM



try following crossdomain.xml file . For testing purpose always use * for domains that allows all the domains . Once the application works you can specify proper domain instead of *. This file should be kept at root of the domain and should be accessible like http://172.22.7.7:8080/crossdomain.xml



  <?xml version="1.0" ?> 
- <cross-domain-policy>
  <site-control permitted-cross-domain-policies="master-only" /> 
  <allow-access-from domain="*" /> 
  <allow-http-request-headers-from domain="*" headers="*" /> 
  </cross-domain-policy>


2
srikanth
Points: 0
Posts:0
5/27/2011 12:41:25 AM



@inder

that audio server is like an application not a webserver.
so..
currently when i try to connect socket
using socket.connect(host,port);
at server they get <policy-file request />
then they send the above crossdomainpolicy.xml in text format.

after that i get a security sandbox error saying
"ignoring policy file due to syntax error".

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>

3
Nathan
Points: 0
Posts:0
5/28/2011 12:25:53 PM



this does not seems to be a problem with crossdomain file. Flash player will try to access the policy file from location "172.22.7.7:9999/crossdomain.xml". I don't think this will be accessible so its giving a syntax error.

4
srikanth
Points: 0
Posts:0
5/30/2011 4:10:43 AM



SOLVED::
----------

string format of CrossDomainPolicy worked fro me is below...
"<?xml version=\"1.0\"?>\
<!DOCTYPE cross-domain-policy SYSTEM \"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\">\
<cross-domain-policy>\
<allow-access-from domain=\"*\"to-ports=\"4213\" secure=\"false\" />\
</cross-domain-policy>\0";


@Nathan
if it is a webserver then you can get access to the crossDomain.xml
but in my case it was just an application with which i should do Socket connection
so that application sends me crossDomain in text format.
followed by "\0".

one more issue was , along withe crossdaomainFile(String) application was sending some more characters thats why it should Syntax error.
when Used "Wireshark" software ,i found that data(crossdomain) was not correct so fixed that and tried and it worked.

thanx all :)

5
Nathan
Points: 0
Posts:0
6/2/2011 9:02:25 AM



you are amazing srikanth. This was a tough issue. Good work :)


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+5 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions