- Home /
accessing sub directory perhaps an crossdomain error
Hi everybody, I'm facing a weird problem: I'm using the WWW class to access our server for downloading content. Everything works fine if I'm accessing the root under "http://www.mydomain.com/" . But if I'm accessing a subdirectory under "http://www.mydomain.com/subfolderXyz/" I'll get an error saying "Failed downloading http://www.mydomain.com/subfolderXyz/".
If I call the url from a browser everything is fine.
I'm buiding a WebPlayer.
Anyone has a solution??
Thanks, Sebastian
Our crossdomain.xml looks like this:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTE$$anonymous$$ "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only" />
<allow-access-from domain="*" />
</cross-domain-policy>
To quote the Security Sandbox page:
The Unity webplayer does not support the
<allow-http-request-headers-from domain>
and<site-control permitted-cross-domain-policies>
tags. Note that crossdomain.xml should be an ASCII file.
Answer by Bunny83 · May 07, 2012 at 11:31 AM
Do you run your webbuild from the server or locally? If you run it locally, does your server have a crossdomain policy? Usually you should get an error that tells you there is no crossdomain. Are you sure your URL is correct? Most webservers are case sensitive!
I run the webbuild locally.
The server has the crossdomain policy.
The url is correct.
I reside behind a proxy. Using WireShark I realized that I'm reveiving the crossdomain.xml but that's it. Nothing is happening afterwards.
Our crossdomain.xml looks like this:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTE$$anonymous$$ "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only" />
<allow-access-from domain="*" />
</cross-domain-policy>
You should check the logfile for errors.
Btw. great to see some people that try some things before asking questions ;)
So if wireshark doesn't see the actual request i'm pretty sure the crossdomain-check failed. Hopefully the logfile has some useful information ;)
Your answer
Follow this Question
Related Questions
WebGL WWW and Localhost CORS 0 Answers
Error with Facebook's crossdomain file? 0 Answers
Web player file access 1 Answer
Unity Web Player Load Object Error crossdomain.xml 1 Answer
Using WWW class locally (webplayer) 1 Answer