I'm trying to do a secure FTP file upload and keep getting errors. This is compounded by the fact that my target site is using a self signed certificate. I've tried ignoring any issues
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback((obj, certificate, chain, policyErrors) =>
{
return true;
});
and installing the certificate as a trusted root CA which eliminates the policyErrors.
However, I'm still getting the error No connection could be made because the target machine actively refused it
This is actually the inner exception, the outer exception is The remote server returned an error: 227 Entering Passive Mode but I think that's .net getting confused and treating the last info message as an error.
I'm not sure if this is because the host is actually refusing the connection (I'm pursuing this with them) or I'm doing something wrong.
I've enabled logging and it seems to go through fine (authenticates, cwd, pasv etc...) until I get that error.