WCF No connection could be made because the target machine actively refused

setiGuy picture setiGuy · May 12, 2011 · Viewed 20.2k times · Source

I just implemented a simple WCF server using net.tcp.

First, I use 127.0.0.1 as server address and client able to connect the WCF service.

Everything is Ok. But when I try to use the internal IP 192.x.x.x I get an error:

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

Any idea what may cause this?

Best Wishes

PS: I disabled auth on WCF. Even turn off firewall all...Not worked...

Answer

barrypicker picture barrypicker · Aug 18, 2014

Well, I got this error message when I forgot to install necessary components. see link Configuring WCF Service with netTcpBinding

(summary of steps)...

  • Go to "Programs and Features" (usually in control panel)
  • Go to "Turn Windows features on or off"
  • (assuming VS2012) Go to ".NET Framework 4.5 Advanced Services"->"WCF Services"
  • Enable "TCP Activation"