socket over internet solving error: No connection could be made because the target machine actively refused it RRS feed

  • Question

  • Greetings,

    Created a socket with System.Net.Sockets forming a server.

    Then I added a client app, provides text messages between users.

    All works ok on the LAN.

    Now I want to take it to the next level, to message over the internet.

    The only way I could identify my PC internet IP was to use:

    This resulted in "target machine actively refused" on trying client.

    So, then I tried to remove a possible port conflict in the server app by setting the port to 0 - this appears to use an available port. Correct?

    I guessed that the Windows Firewall is preventing the connection. So I included the exe in both incoming and outgoing rules. Then I allowed connection on All ports (TCP). All of this done will the Control Panel.

    And then I executed the 'Prefer IPv4 over IPv6' ... by the way the OS is Windows 7.

    Is there a book on this? Or a really good step by step web article?

    I am probably way out of my depth, but I am ready to learn. Where do I start to get this solved? To exchange data between software applications over the internet.

    Thanks for reading.

    Have a great day. Kevin.

    Tuesday, April 23, 2013 6:23 PM