Home Forums Support Unable to create a TCP connection Reply To: Unable to create a TCP connection

#1403
Anonymous
Inactive

I made a slight change that msdc123 posted to have my client use the following:

Connection newTcpConnection = TCPConnection.GetConnection(new ConnectionInfo("192.168.1.147", 10000));
newTcpConnection.SendObject("Plugin", myObject);

I also used the same code snippet from one of the tutorials to get the addresses and port that the server is listening on and i get the following output:

Service listening for TCP connection on: fe80::5efe:192.168.1.147%10:10000
Service listening for TCP connection on: fe80::186f:3e8a:cd51:7732%9:10000
Service listening for TCP connection on: 2001:0:5ef5:79fb:186f:3e8a:cd51:7732:10000
Service listening for TCP connection on: 127.0.0.1:10000
Service listening for TCP connection on: ::1:10000
Service listening for TCP connection on: 192.168.1.147:10000
Service listening for TCP connection on: fe80::50e3:36de:8e19:fd02%3:10000
Service listening for TCP connection on: fe80::4810:e1e5:8958:860c%4:10000
Service listening for TCP connection on: fe80::f03a:5a2:9fa3:c9f9%6:10000
Service listening for TCP connection on: fe80::acac:cf14:e233:959b%7:10000

I see the address and port I am trying to connect with in that list so to me it seems like it should be working but I still get the following error:

DPSBase.ConnectionSetupException: Error during TCP connection establish with destination ([TCP] Local -> 192.167.1.147:10000). Destination may not be listening or connect timed out. System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)
   at NetworkCommsDotNet.TCPConnection.ConnectSocket() in c:\Users\Karnifexx\Documents\Visual Studio 2010\Projects\networkcomms.net\NetworkCommsDotNet\Connection\TCP\TCPConnectionCreate.cs:line 336
   at NetworkCommsDotNet.TCPConnection.ConnectSocket() in c:\Users\Karnifexx\Documents\Visual Studio 2010\Projects\networkcomms.net\NetworkCommsDotNet\Connection\TCP\TCPConnectionCreate.cs:line 349
   at NetworkCommsDotNet.TCPConnection.EstablishConnectionSpecific() in c:\Users\Karnifexx\Documents\Visual Studio 2010\Projects\networkcomms.net\NetworkCommsDotNet\Connection\TCP\TCPConnectionCreate.cs:line 185
   at NetworkCommsDotNet.Connection.EstablishConnection() in c:\Users\Karnifexx\Documents\Visual Studio 2010\Projects\networkcomms.net\NetworkCommsDotNet\Connection\ConnectionCreate.cs:line 150
   at NetworkCommsDotNet.TCPConnection.GetConnection(ConnectionInfo connectionInfo, SendReceiveOptions defaultSendReceiveOptions, TcpClient tcpClient, Boolean establishIfRequired) in c:\Users\Karnifexx\Documents\Visual Studio 2010\Projects\networkcomms.net\NetworkCommsDotNet\Connection\TCP\TCPConnectionCreate.cs:line 142
   at OSAE.ClientService.ClientService.LoadPlugins() in c:\Users\Brian\Developement\Open Source Automation\Services\ClientService\ClientService.cs:line 205