C# – ‘No connection could be made because the target machine actively refused it

cnet

I am running a client application which should connect to a server side application in .NET.

Are there any restrictions on the number of connections a listening port can receive on the server?
I'm asking because I got an exception Message:

No connection could be made because the target machine actively refused it 1.9.64.212:62131

Best Answer

The error "No connection could be made because the target machine actively refused it" means that your request got through so it is not a firewall issue. This message means that noone listens to this port. Make sure your server application is running and that it listens to the right port number (and IP address). On your server computer you can run "netstat -a -b" to find port numbers and server applications that listen to those ports.

Related Topic