- Home /
Crossdomain policy problem.
Hi! I've been trying to fix this all day, but without any luck. I setup a MySQL database hosting at 000webhost, it works fine, I can add stuff, retrieve information. Well, it works except in an online hosted webplayer on dropbox. When I run the webplayer locally, it's fine, but when I play it online (public link), it stops working. Weirdest thing is, I can even access the file manually. The domain is:
http://domainname.freeiz.com/
when I open a web browser and go to, it loads fine.
http://domainname.freeiz.com/crossdomain.xml
But when the webplayer tries to access it, it fails, with 3 errors:
- Error reading crossdomain policy: Invalid attr value
- Rejected because no crossdomain.xml policy file was found
- SecurityException: No valid crossdomain policy available to allow access
It's odd, because the first error basically contradicts the second one, because it clearly found a crossdomain.xml file, just couldn't read it properly.
Anyways, is anyone else experiencing the same problem? Has anyone fixed it already?
Thanks, David
$$anonymous$$ake sure the file matches the standards defined here: http://www.adobe.com/devnet/adobe-media-server/articles/cross-domain-xml-for-strea$$anonymous$$g.html
Thanks for commenting. I've read the above link, even tried their least retrictive policy, but without any luck.
Well the URLs you supplied aren't valid URLs so I can't check. But it's clearly saying something's wrong with the file.
Running locally runs at a higher permissions elevation level than running from the Web. That's probably why local is fine.
Yeah the file there is clearly good.
The next step should be to use WireShark and double check every end point and every returned payload.
From the Unity manual:
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 DavidDebnar · Oct 31, 2013 at 12:28 AM
Alright, I've finally managed to find and fix the issue. The problem was, that because I am hosting the webplayer on Dropbox, it defaults to https:// instead of http://. Then, when Unity tried to connect to the database server, it failed, because the protocols didn't match. Anyways, the fix was to use https://domain.com/ in my script.
Answer by IanSantos · Aug 10, 2017 at 07:54 PM
I'm having this problem right now. I don't know how to access the crossdomain.xml that I put in the public_html of 000webhost. My project in unity can access the database of localhost and php files but when I used this 000webhost, can't save data to online database. what solution should I do?
Your answer
Follow this Question
Related Questions
crossdomain.xml on Server Requiring Basic Authorization 0 Answers
SocketPolicyClient error w/ Mac Webplayer 1 Answer
Yet another case of Unity Web Player Crossdomain.xml troubles 5 Answers
Webplayer Emulation when doing Dev Builds? 0 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers