Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error connecting to another workstation via TcpClient

Status
Not open for further replies.

vatawna

Programmer
Feb 24, 2004
67
0
0
US
I created an object client = new TcpClient()
Then try to connect to another workstation via

client.Connect(System.Net.IPAddress.Parse("192.168.1.3"), 1000);

I got the error message "No connection could be made because the target machine actively refused it".

My and the other workstation are both on the same network, and have the Windows Firewall off. I can also ping the other workstation from mine successfully.

Does anybody know how to fix this?

Thanks.
 
The other computer is not a server. The code that runs on the other computer is as follows:

listener = new TcpListener(System.Net.IPAddress.Parse("192.168.1.159"), 1000);
listener.Start();
while (true)
{
try
{
client = listener.AcceptTcpClient();
...
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top