J
Jay
I have a socket listener and a test app.
The socket listener app: opens up the port 51296 and listens.
The test app - sends a message on port 51296.
If the listener and test app are on the same box, all is well - everything
works as expected.
But when I move my test app to a remote box: I get the following error:
"no connection could be made because the target machine actively refused it"
--------------------------------------------------
This is the listener code:
IPHostEntry hostEntry = Dns.GetHostEntry(myserver.domain.com);
IPEndPoint ipe = new IPEndPoint(hostEntry.AddressList[0], 51296);
Socket soc =
new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
soc.Connect(ipe);
soc.Send(Encoding.ASCII.GetBytes("some text message"));
soc.Close();
------------------------------------------------------------------------------------------------
I have firewall enabled on the server box (where the listener is running).
I tried setting the firewall options to unblock the port 51296 for all
traffic.
That did not work.
Any ideas on how to detect where the problem is..?
Thanks much
Jay
The socket listener app: opens up the port 51296 and listens.
The test app - sends a message on port 51296.
If the listener and test app are on the same box, all is well - everything
works as expected.
But when I move my test app to a remote box: I get the following error:
"no connection could be made because the target machine actively refused it"
--------------------------------------------------
This is the listener code:
IPHostEntry hostEntry = Dns.GetHostEntry(myserver.domain.com);
IPEndPoint ipe = new IPEndPoint(hostEntry.AddressList[0], 51296);
Socket soc =
new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
soc.Connect(ipe);
soc.Send(Encoding.ASCII.GetBytes("some text message"));
soc.Close();
------------------------------------------------------------------------------------------------
I have firewall enabled on the server box (where the listener is running).
I tried setting the firewall options to unblock the port 51296 for all
traffic.
That did not work.
Any ideas on how to detect where the problem is..?
Thanks much
Jay