Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Dec 14, 2012 at 06:50 PM by Dexter.Unity for the following reason:

The question is answered, right answer was accepted

avatar image
1
Question by Dexter.Unity · Dec 14, 2012 at 05:40 PM · wwwdatabasecrossdomain.xmllocalhost

WWW doesn't work on localhost eventhough crossdomain.xml exists

Hi guys!

I want to access data from my WAMP based database on my localhost. Only using the following script gave me an error:

 function Start() {
     hs_get = WWW('http://localhost/unity/');
     yield hs_get;
  
     if(hs_get.error) {
         print("There was an error getting the data: " + hs_get.error);
     } else {
         Debug.log(hs_get.text);
     }
 }

There was an error getting the data: Rejected because no crossdomain.xml policy file was found.

So I placed a crossdomain.xml in my localhost. Now if I open the following link: http://localhost/unity/crossdomain.xml I get the crossdomain.xml file. The file contains the following:

 <?xml version="1.0"?>
 <cross-domain-policy>
 <allow-access-from domain="*"/>
 </cross-domain-policy>

But still Unity gives me the same error :(

 There was an error getting the data: Rejected because no crossdomain.xml policy file was found
 UnityEngine.MonoBehaviour:print(Object)
 $:MoveNext() (at Assets/Avatar/Character/_Character.js:45)

I've been searching but cannot get an awnser! Can some one help!?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by Bunny83 · Dec 14, 2012 at 06:04 PM

The crossdomain policy file have to be in the root. So Unity looks for it at this path:

 http://localhost/crossdomain.xml

To quote the above link:

 ...you would need to place a crossdomain.xml file at the root of the 
 highscoreprovider.net domain like this:
 http://highscoreprovider.net/crossdomain.xml


Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dexter.Unity · Dec 14, 2012 at 06:45 PM 0
Share

Thanks that was the problem, I though root of the website itself -.- Thank you! :D

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

WWW does not work on localhost 0 Answers

Is it possible to open a web page inside Unity? 2 Answers

GetPixel error on downloaded texture even with crossdomain.xml 1 Answer

Crossdomain woes 2 Answers

www php send data to mysql 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges