I am trying to modify the Photon.LoadBalancing.dll.config file in the GameServer folder from inside Unity via this codeblock:
The modification of the XML file is done successfully and I have manually checked the config file to confirm that the correct IP address has been saved.
However when I try to start the photon server from the .cmd file provided, the photon server launches and then craches after a few tries.
This does not happen when I try to launch PhotonControl.exe and specifying the IP address from the Game Server Settings option.
I am not sure what I am doing wrong here.
this is the logs I am getting:
XmlDocument xml = new XmlDocument();
xml.Load(Application.dataPath + "/../PhotonServer/deploy/Loadbalancing/GameServer/bin/Photon.LoadBalancing.dll.config");
xml.SelectSingleNode("descendant::setting[value='127.0.0.1']").NextSibling.NextSibling.NextSibling.NextSibling.LastChild.InnerText = System.Net.IPAddress.Parse(IPField.text).ToString();
xml.Save(Application.dataPath + "/../PhotonServer/deploy/Loadbalancing/GameServer/bin/Photon.LoadBalancing.dll.config");
The modification of the XML file is done successfully and I have manually checked the config file to confirm that the correct IP address has been saved.
However when I try to start the photon server from the .cmd file provided, the photon server launches and then craches after a few tries.
This does not happen when I try to launch PhotonControl.exe and specifying the IP address from the Game Server Settings option.
I am not sure what I am doing wrong here.
this is the logs I am getting:
77944: 05:50:54.777 - Service is running... 77944: 05:51:01.662 - Game:3 - PhotonRunning() failed. Exception: System.FormatException: An invalid IP address was specified. at System.Net.IPAddress.InternalParse(String ipString, Boolean tryParse) at Photon.LoadBalancing.GameServer.GameApplication.Setup() in d:\dev\photon-socketserver-sdk_cloud\src-server\LoadBalancing\LoadBalancing\GameServer\GameApplication.cs:line 316 at Photon.SocketServer.ApplicationBase.PhotonHostRuntimeInterfaces.IPhotonControl.OnPhotonRunning() in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\ApplicationBase.cs:line 1189 at PhotonHostRuntime.PhotonDomainManager.PhotonPlainAppDomainBehavior.PhotonRunning() at PhotonHostRuntime.PhotonDomainManager.PhotonRunning() 77944: 05:51:01.662 - CService::OnException() - Exception: CManagedHost::PhotonRunning() - Failed in AppDomain: 3 - An invalid IP address was specified.