Crossdomain policy error when debugging using MonoDevelop

Options
timthib
edited June 2011 in DotNet
I'm using MonoDevelop to debug a Unity/Photon application. I'm getting the error "Unable to connect, as no valid crossdomain policy was found". I'm running the client and server on the same machine. If I run the application directly from Unity instead of debugging it using MonoDevelop, it will connect fine.

Has anyone else run into this problem?

Comments

  • Tobias
    Options
    The policy file request is made by webplayer builds. Depending on your settings, the editor won't require this.
    If you run the default applications from the SDK, the "Policy" application should be started by Photon. You can look out for it in the logs (if it's started).

    You could possibly set the project to "standalone" build to debug. If this also requires a policy file, it would be a Unity bug in debug mode.
  • timthib
    Options
    Thanks for the info. The Policy application was definitely running as indicated by the Policy log file but I would get an immediate OnDisconnect in the log without a Policy being sent. I've switched the build setting to standalone and that seems to work fine, so I'll just debug that way.
  • Tobias
    Options
    There should be a Policy.log in the deploy/logs/ folder. This logs when it reads the policy files on start and when a policy request is replied to.
    It either is not logged, you might need to check if all files are existing and placed like in the SDK.
    The port we use by default for the policy request is tcp 843. If you change the "gaming" ports of Photon (udp 5055), you need to adjust the policy files, too. They are read from: \deploy\Policy\Policy.Application\assets\