0

I wrote a simple tcp/ip chat and it worked with the localhost IP(127.0.0.1) as well as connecting to another computer on the local network. Through the Internet (v4 IP address) it didn't work so I tried the codeproject example:

I downloaded but it threw the same exception on connecting:

TcpClient Client = New TcpClient(IPAddr, 65535);

I tried with another port and turned off Windows-Firewall and Avira-Free.

Update: If I connect to another Internet IP address, the following exception is thrown:

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond IP-Address: 65535

xoxox
  • 719
  • 1
  • 13
  • 24
  • [Possible duplicate](http://stackoverflow.com/questions/2972600/no-connection-could-be-made-because-the-target-machine-actively-refused-it). – Brian Feb 08 '13 at 16:42
  • Either the port is being blocked or there is nothing listening at the other end – Matt Wilko Feb 08 '13 at 16:50
  • @Brian I updated my question, and in that question the localhost ip-address is used, which is working on my computer. But I'll give it a try, thanks – xoxox Feb 08 '13 at 17:05
  • The error message in your title has nothing to do with the error message in your question. Which is it you are asking about? – user207421 Feb 09 '13 at 09:16
  • @EJP If I want to connect to my internet IP, the title-error is shown, if I connect to another internet IP, the 2. error (update) is shown. – xoxox Feb 09 '13 at 20:37
  • @xoxox - Can you try this example and tell me if you still have problems? The download is at the top of the page. http://www.networkcomms.net/creating-a-wpf-chat-client-server-application/ – MarcF Feb 09 '13 at 21:14
  • Your target machine's IP might not be public IP. You can try by pinging the target machine's IP, you should be able to ping the target machine's IP. – Ashish Feb 26 '13 at 11:41
  • @MarcF Thank you, I'll try it, but I doubt that this works, I rather think it's the problem mentioned by Ashish – xoxox Mar 03 '13 at 18:24

1 Answers1

-1

Probably this won't help, but perhaps try another port?

Mavamaarten
  • 1,959
  • 18
  • 19