abdelkayoum derfoufi abdelkayoum derfoufi - 1 month ago 23
C# Question

System.net.Sockets.SocketException No Connection could be made because the target machine actively refused it

I am a new member in a team project. I got the latest version of the solution, configured SQL Server and IIS, where they host the services (WCF).
when I debug the solution I get this exception.


System.net.Sockets.SocketException No Connection could be made because the target machine actively refused it


I tried this, and didn't work:


  • Disable the firewall.

  • Change the port in IIS.



Screenshot

Answer

If you want to configure bindings, right-click on your website and go to 'Edit Bindings...'. You have to add a new site binding corresponding to net.tcp with default binding 808:*.