NTP connection - "Unable to connect, as no valid crossdomain policy was found"

Hi all,

I am trying to establish a connection to a NTP server in order to get time im my scene (I agree that the time can be obtained using easier ways…)
I found a C# class which proposes a static method in order to do this. The probleme is that when I run the scene, an error is thrown

SecurityException: Unable to connect, as no valid crossdomain policy was found

I tried to add a crossdomain on the server where is hosted my unity scene in order to authorize the connection to the NTP server but it does not seem to be loaded. When I launch my scene in a browser with tools like fiddler or firebug no crossdomain is requested…

Does somebody have an experience of such a problem ?
ps: I have read this thread without success http://unity3d.com/support/documentation/Manual/Security%20Sandbox.html

Kind regards,

any idea ?

I believe the crossdomain should reside on the ntp server :smile:

Any time you try and establish a non web TCP connection from the web browser, it will first check to make sure it’s allowed. The link you posted talks about it in the section “Implications for usage of Sockets”

The NTP server would need to have something listening on port 843 that would return a valid socket policy.

if you connect through anything but WWW you must have a policy server running, just having a crossdomain.xml found at http://www.yourdomain.com:80/crossdomain.xml will not be enough for TCP / UDP sockets

I totally agree and understand. This means that if no NTP server proposes to serve these policy information I will have to make a proxy in ASP.NET for example where my application will be able to connect. Am I right ?
Thank you for support

If by proxy you mean a script on the same domain as the webplayer, i think you are right. Though I dont know if the accuracy of this method is enough for you.

Yes this what I mean but you are right using this proxy may produce a too high latency… I am going to make some tests

Don’t know the limits of ASP.NET but what the policy server has to do is accept TCP connections on port 843 and feed the policy (near equal to cross domain, but has additionally ports) back there.
see the policy server that comes with unity (or use that one potentially)

many thanks for your help I am goind to try