Hello,
I am getting this error as
WSAGetLastError() returned 10061, Connection refused
can anyone please advise me the reason and where to look for the cause of this error?
Hello,
I am getting this error as
WSAGetLastError() returned 10061, Connection refused
can anyone please advise me the reason and where to look for the cause of this error?
That's the WinSock API telling you that a connection to a remote server was refused. (The server is up, but isn't accepting connections on the port you want). Who exactly tried to establish this connection is entirely application-dependent.
You're trying to connect to a server using a port number on which the server is not listening.
For example, you're trying to connect to port 80 but the remote machine isn't running a web server.
As Dmitry correctly pointed out, this error happens when the remote machine exists, but is not accepting connections on the specified port. Alternatively it could be caused by firewall blocking the connection. I recommend using a tool like Wireshark to see the low-level TCP/IP packets that are exchanged.
Thank you all, IMail server wasn't up so I was getting these errors. FIXED