Nathan Nathan - 18 days ago 21
ASP.NET (C#) Question

Renci ssh.net No connection could be made because the target machine actively refused it

We recently deployed a project into production and are now receiving this error message when we attempt to connect to the external sftp machine, "No connection could be made because the target machine actively refused it". When I was developing the application and testing it, we had no issues connecting to this server. Will someone please explain to me what would be different? Yes I have administrative privileges and the app pool on the production server does not. I'm not sure if this could be what's causing the issue or if it may be something on the external client's server or their firewall blocking us.

If someone can please explain this to me and explain how I can resolve this problem, I would greatly appreciate it.

Thanks in advance

Answer

This is a standard TCP error

WSAECONNREFUSED - 10061

From the Client's point of view it means 'there is no socket at that address listening to that port' (the "actively refused" is a red herring).

i) check the address ii) check the port iii) check firewall(s)