josgood
asked on
Socket connection actively refused
I'm new to socket programming. I have
Socket socket = new Socket(AddressFamily.Inter Network,So cketType.S tream,Prot ocolType.T cp);
IPHostEntry host = Dns.GetHostEntry("localhos t");
IPEndPoint endPoint = new IPEndPoint(host.AddressLis t[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.
Socket socket = new Socket(AddressFamily.Inter
IPHostEntry host = Dns.GetHostEntry("localhos
IPEndPoint endPoint = new IPEndPoint(host.AddressLis
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
ASKER