Port forwarding issue with self-hosted server

Options
fanch35
edited August 2014 in Photon Server
My Photon server is running behind a router that redirects all incoming connections to it for the default Photon server ports. When I run my client (on the same machine) with the public IP and the default Server Port (eg 5055) everything works fine and I can connect to the server. However I would like to use another Server Port in my client configuration but not in the server configuration so I configured my router to redirect all incoming request of port XXX (the new port) to 5055 which should be transparent for the Photon server. However it does'nt work and I got the following error :

Connect() failed: System.Security.SecurityException: Unable to connect, as no valid crossdomain policy was found
at System.Net.Sockets.Socket.Connect_internal (IntPtr sock, System.Net.SocketAddress sa, System.Int32& error, Boolean requireSocketPolicyFile) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.IPAddress address, Int32 port) [0x00000] in <filename unknown>:0
at ExitGames.Client.Photon.SocketUdp.DnsAndConnect () [0x00028]

The port forwarding works as I set it up to forward the same port number XXX to 80 and I am able to reach my apache index.html file using the address [url=http://publicIp:XXX/index.html]http://publicIp:XXX/index.html[/url].
If someone ever had this problem I would be happy to know how to fix this :D

Comments

  • The solution was in the error message... I actually forgot to modify my deploy\Policy\assets\socket-policy.xml file to add the new port.