简体   繁体   中英

'No connection could be made because the target machine actively refused it

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

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.

There are some possible reasons for that:

  • The server is not running. Hence it wont listen to that port. If it's a service you may want to restart the service.
  • The server is running but that port is blocked by Windows Firewall or other firewall. You can enable the program to go through firewall in the Inbound list.
  • There is a security program on your PC, ie a Internet Security or Antivirus that blocks several ports on your PC.

这必须是防火墙问题(或其他连接问题),或者服务器未正确启动。

当你的服务抛出一个未处理的异常时,我看到了这条消息,所以检查一下。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM