Can not connet, because the target computer is actively refusing it SocketException 0x80004005

-1

I started learn about socket, all time i get exception, that my computer actively refuse connect

I try to send string and receive the same string

IPHostEntry ipHost = Dns.GetHostEntry(Dns.GetHostName());
IPAddress ipAddr = ipHost.AddressList[0];
IPEndPoint localEndPoint = new IPEndPoint(ipAddr, 11111);

Problem appear in first line, and I get exception that my coputer actively refuse; code of error is 0x80004005. There I get two address, in first Address return exception, in second I get exception in ScopeId. I try instead of Dns.GetHostName() type "localhost", but still nothing. I have no idea what is wrong, I found some solution in the internet but no solution matching to my case.

c#
sockets

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0