Is the IP from the source or target in this System.Net.Sockets.SocketException?

Posted by Jeremy Mullin on Stack Overflow See other posts from Stack Overflow or by Jeremy Mullin
Published on 2010-03-19T03:30:46Z Indexed on 2010/03/19 3:31 UTC
Read the original article Hit count: 455

Filed under:
|

I'm making an outbound connection using a DNS name to a server other than the localhost, and I get this exception:

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:5555

The text implies that the TARGET machine refused the connection, but the IP address and port are from the localhost, which is kind of confusing. So is that IP address really the outgoing IP and port, even though the exception was caused by the target refusing the connection? Or is the exception from the local firewall blocking the outgoing connection?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about socket-programming