Socket programmming

socket , csharp , serverclient Ţungī, Bangladesh
  • 12 years ago
    Hi everybody, I am Tanmoy. I just wanna create a simple server-client chat application in C#. I have downloaded the source code from the link below: If the server & client both in same PC everything is OK. But if the client application tries to establish a connection to a the server application on a remote PC it fails to do so. A messagebox show the following message: A connection attemp 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 what can I do? Please help me.
  • 12 years ago
    Hi, welcome to developerFusion! :) The most likely scenario is that a firewall is blocking that port - by default the firewalls on Windows XP SP1 and Vista will be blocking that port. Try temporarily turning off the firewall and see if that solves the issue? If it is, then you'll need to look at explicitly opening port 8000 on the machine listening for connections (and then turn the firewall back on!) Hope that helps
  • 12 years ago
    In addition to the comment from James, you could try out testing with the PortQry and PortQryUI tools (from the Microsoft website). They will scan ports to check connectivity. If, when you've started the server, the PortQry tool responds that it cannot access the port, then the problem isn't likely to be your code. Also, try running "netstat -a" from the command prompt on the server machine (when the server daemon is running). You should be able to see port 8000 is in a listening state.

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor