Link to home
Start Free TrialLog in
Avatar of josgood
josgoodFlag for United States of America

asked on

Socket connection actively refused

I'm new to socket programming.  I have
         Socket socket = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
         IPHostEntry host = Dns.GetHostEntry("localhost");
         IPEndPoint endPoint = new IPEndPoint(host.AddressList[0],8080);
         socket.Connect(endPoint);
The Connect call fails with "No connection could be made because the target machine actively refused it".

The debugger says host.AddressList[0] is 127.0.0.1.

I'm running Windows XP Media Center Edition Version 2002 SP2.  I have ZoneAlarm installed, with trusted zone security turned off.  I have the same problem if I shut it down.  Windows Firewall is turned off.

I probably need to turn off some protection or enable port 8080 somewhere, but I don't know where to look.

I appreciate your help.
Avatar of josgood
josgood
Flag of United States of America image

ASKER

Increased point value
ASKER CERTIFIED SOLUTION
Avatar of RichardJFoster
RichardJFoster

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of josgood

ASKER

Thank you _very_ much!  

Thank you for taking the time to think of where a beginner could have gone wrong and then providing example code.  I really appreciate it.

Your answer was exemplary.