This error started appearing with Unity 3.0 while using WWW:
Same script was running flawlessly in 2.x.
Anyone have a clue what this is? Can’t find any references regarding Unity cross domain policies.
This error started appearing with Unity 3.0 while using WWW:
Same script was running flawlessly in 2.x.
Anyone have a clue what this is? Can’t find any references regarding Unity cross domain policies.
This is probably to do with the new security system present in Unity 3 which requires the use of a crossdomain file. It mentions it in the whats new, and the documents parts of the site.
you can read about it here :
http://unity3d.com/support/documentation/Manual/Security%20Sandbox.html
Im getting this error when i make a windows stand alone exe! Im playing with some electroserver 5 code, and testing the simpleChat example. Since I cant run 2 unity editors at once, I figured making a standalone to run along side the unity editor would help me. I dont get the problem in the editor…just the standalone exe. I also tried making a crossdomain.xml file and put it int the exe dir, but no luck.
Anyway, any ideas?
This is easy to solve:
Create a file named “crossdomain.xml” on your root host path, ex: (http://localhost/crossdomain.xml, or http://whateverYourWebsiteNameIs/crossdomain.xml)
The content of that file should be this:
<?xml version="1.0"?>Hi
I have done that but I still get this error when I set the the build as webplayer and is ok when the build is standalone:
SecurityException: No valid crossdomain policy available to allow access
UnityEngine.WWW.get_text () (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/Utils.cs:172)
please help
Hello,
I fixed this problem once in the past, but when godaddy switched to Cpanel, I now have the problem again. Anybody know where to find the server name in godaddy? I don’t believe ‘localhost’ works for the string name…
That is what worked for me in the past.
Okay, have it working.
Managed to find the server name here: (if you’re hosting on godaddy) How to find your server name in cPanel
But, instead of how he wrote it you put a @ between server name and domain name.
Example: string loadinfo = “http://servername@domainname.com/pagename.php”; (don’t add the /~username)
Also, in unity IDE, under Edit->ProjectSettings->Editor
in the ‘inspector’ panel WWW Security Emulation
host name: http://www.domainname.com/crossdomain.xml
I wrote my crossdomain.xml with basic notepad, under Format made sure ‘Word Wrap’ was un-clicked, and saved as Encoding: ANSI
<?xml version="1.0" encoding="ASCII"?>filesize was 133 bytes after upload.
In unity IDE, under Edit->ProjectSettings->Editor
in the ‘inspector’ panel WWW Security Emulation
host name: http://www.domainname.com/crossdomain.xml
I wrote my crossdomain.xml with basic notepad, under Format made sure ‘Word Wrap’ was un-clicked, and saved as Encoding: ANSI
<?xml version="1.0" encoding="ASCII"?>filesize was 133 bytes after upload.
Hello recent update,
Just had the same problem with the Unity 5.0.1f version , I tried your answer.
Just putting and xml file on my server with the content indicated in the documentation:
Then I just changed the WWW Security emulation as pointed out justmail0116:
and replacing the link by the adress of the xml file did the work for me.
Cheers!
Soulwax
I just discovered this problem going from an iOS version to web player. I created the XML file, installed it in my root directory, and changed the security emulation to point to that file. It looks like I’v done everything correctly based on the Sandboxing section of the manual. But when I try to do this:
var www = new WWW(“http://www.mydomain.com/licenses/canton.txt”);
It returns this:
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn’t understand how to supply the credentials required.
That’s in the editor. When I build and run in the Web Player, it looks like it returns nothing.
I see someone mentioned needing a server name, but I don’t see where that would be used or needed.
Turns out the problem was my file was in a protected folder.