Error on connect with .NET realtime client to self-hosted server

Hi
I downloaded photon-dotnet-sdk_v4-1-2-20 and change NameServerHost property in DemoClient.cs in demo-loadbalancing project to my server address and got this error:

'demo-loadbalancing.exe' (CLR v2.0.50727: DefaultDomain): Loaded 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.
'demo-loadbalancing.exe' (CLR v2.0.50727: DefaultDomain): Loaded 'C:\Users\photon-dotnet-sdk_v4-1-2-20\demo-loadbalancing\bin\Debug\demo-loadbalancing.exe'. Symbols loaded.
'demo-loadbalancing.exe' (CLR v2.0.50727: demo-loadbalancing.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'.
'demo-loadbalancing.exe' (CLR v2.0.50727: demo-loadbalancing.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'.
'demo-loadbalancing.exe' (CLR v2.0.50727: demo-loadbalancing.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'.
'demo-loadbalancing.exe' (CLR v2.0.50727: demo-loadbalancing.exe): Loaded 'C:\Users\photon-dotnet-sdk_v4-1-2-20\demo-loadbalancing\bin\Debug\PhotonLoadbalancingApi.dll'. Symbols loaded.
'demo-loadbalancing.exe' (CLR v2.0.50727: demo-loadbalancing.exe): Loaded 'C:\Users\photon-dotnet-sdk_v4-1-2-20\demo-loadbalancing\bin\Debug\Photon3DotNet.dll'. Symbols loaded.
'demo-loadbalancing.exe' (CLR v2.0.50727: demo-loadbalancing.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll'.
Exception thrown: 'System.DllNotFoundException' in mscorlib.dll
Exception thrown: 'System.DllNotFoundException' in mscorlib.dll
Exception thrown: 'System.DllNotFoundException' in mscorlib.dll
'demo-loadbalancing.exe' (CLR v2.0.50727: demo-loadbalancing.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'.
'demo-loadbalancing.exe' (CLR v2.0.50727: demo-loadbalancing.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'.
The thread 0x5bc has exited with code 0 (0x0).
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
The thread 0x24dc has exited with code 0 (0x0).
ClientTimeout caused a disconnect. State: Disconnected statusCode: Disconnect.

how can I solve it?

Comments

  • If you use self hosted Photon Server, there is no Name Server in the package.
    You need to connect to a Master Server instead.
    Use ConnectToMasterServer() after setting the client.MasterServerAddress or use ConnectUsingSettings() with the AppSettings.UseNameServer = false and the .Server set to your address.

  • Which .Net Framework do you set for your build?
  • Tobias wrote: »
    Which .Net Framework do you set for your build?

    Which one should be used?