That unfortunately did not seem to fix the issue. I tried hard coding the SSLVersion to SSLFTPSSLVersion.SSL3 just for a quick test and look to be getting the same results. I'm puzzled on this. I thought for sure that would work.
Here are the logs.
DEBUG [SocketController] 22 Dec 2014 09:44:22.425 : FTPConnection.1 CloseConnection(e=null)
INFO [FTPConnection] 22 Dec 2014 09:44:22.440 : OS: 6.1.7601.65536, CLR: 2.0.50727.5485, DLL: 8.6.3.20
INFO [FTPConnection] 22 Dec 2014 09:44:22.440 : Built: 18-Nov-2014 10:00:14 GMT
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Looking for subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO (fallback )
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Found license subkey Software\Enterprise Distributed Technologies\edtFTPnet PRO
DEBUG [LicenseProperties] 22 Dec 2014 09:44:22.440 : Did not find license subkeys Software\Enterprise Distributed Technologies\edtFTPnet PRO or in registry
DEBUG [SFTPMessageStore] 22 Dec 2014 09:44:22.440 : Set timeout=120000
INFO [LicenseProperties] 22 Dec 2014 09:44:22.440 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 22 Dec 2014 09:44:22.440 : Production license
DEBUG [FTPConnection] 22 Dec 2014 09:44:22.440 : Set LocalDirectory='C:\WINDOWS\SysWOW64\inetsrv'
DEBUG [SecureFTPConnection] 22 Dec 2014 09:44:22.440 : Set LocalDirectory to C:\WINDOWS\SysWOW64\inetsrv
INFO [LicenseProperties] 22 Dec 2014 09:44:22.440 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 22 Dec 2014 09:44:22.440 : Production license
DEBUG [SSLFTPClient] 22 Dec 2014 09:44:22.440 : Connecting to ClientFTPServerName.com:5555
DEBUG [SSLFTPControlSocket] 22 Dec 2014 09:44:22.440 : waitOnShutdownSSL=True
DEBUG [ExFTPControlSocket] 22 Dec 2014 09:44:22.440 : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=ClientFTPServerName.com, controlPort=5555, timeout=120000
DEBUG [FTPControlSocket] 22 Dec 2014 09:44:22.440 : StrictReturnCodes=False
DEBUG [HostNameResolver] 22 Dec 2014 09:44:22.440 : Resolving ClientFTPServerName.com
DEBUG [HostNameResolver] 22 Dec 2014 09:44:22.440 : Obtained 1 addresses
DEBUG [HostNameResolver] 22 Dec 2014 09:44:22.440 : IP address: 140.108.21.109
DEBUG [HostNameResolver] 22 Dec 2014 09:44:22.440 : ClientFTPServerName.com resolved to 140.108.21.109
DEBUG [ExFTPControlSocket] 22 Dec 2014 09:44:22.440 : Connecting directly to ftp-server ClientFTPServerName.com:5555
INFO [SSLFTPSocket] 22 Dec 2014 09:44:22.440 : Connecting to 140.108.21.109:5555 with timeout 120000 ms
DEBUG [SSLFTPSocket] 22 Dec 2014 09:44:22.487 : Successfully connected to 140.108.21.109:5555
DEBUG [FTPControlSocket] 22 Dec 2014 09:44:22.487 : Setting socket timeout=120000
ALL [SecureSocket] 22 Dec 2014 09:44:22.487 : SecureSocket timeout=120000
ALL [SecureSocket] 22 Dec 2014 09:44:22.487 : SecureSocket timeout=120000
INFO [FTPControlSocket] 22 Dec 2014 09:44:22.487 : Command encoding=System.Text.SBCSCodePageEncoding
DEBUG [FTPControlSocket] 22 Dec 2014 09:44:22.550 : 220 CONNECT:Enterprise Gateway 2.1.00. FTP Server ready...
DEBUG [FTPControlSocket] 22 Dec 2014 09:44:22.550 : ---> AUTH TLS
DEBUG [FTPControlSocket] 22 Dec 2014 09:44:22.596 : 234 AUTH: command accepted. Securing command channel ...
DEBUG [SSLFTPControlSocket] 22 Dec 2014 09:44:22.596 : Beginning Tls1, Tls11 handshake.
DEBUG [CompatibilityLayer] 22 Dec 2014 09:44:22.596 : Local min SSL version: 3.1, max SSL version: 3.2
DEBUG [SocketController] 22 Dec 2014 09:44:22.674 : FTPConnection.2 Processing hello
DEBUG [CompatibilityLayer] 22 Dec 2014 09:44:22.674 : FTPConnection.2 Remote SSL version: 3.2
ALL [HandshakeLayer] 22 Dec 2014 09:44:22.674 : FTPConnection.2 ProcessMessages(Handshake)
ALL [HandshakeLayer] 22 Dec 2014 09:44:22.674 : FTPConnection.2 Handshake Message: ServerHello
ALL [HandshakeLayer] 22 Dec 2014 09:44:22.674 : FTPConnection.2 ProcessMessages(Handshake)
ALL [HandshakeLayer] 22 Dec 2014 09:44:22.674 : FTPConnection.2 Handshake Message: Certificate
ALL [HandshakeLayer] 22 Dec 2014 09:44:22.674 : FTPConnection.2 ProcessMessages(Handshake)
ALL [HandshakeLayer] 22 Dec 2014 09:44:22.674 : FTPConnection.2 Handshake Message: ServerHelloDone
WARN [SocketController] 22 Dec 2014 09:44:22.737 : FTPConnection.2 OnReceive - (An existing connection was forcibly closed by the remote host) - closing
DEBUG [SocketController] 22 Dec 2014 09:44:22.737 : FTPConnection.2 CloseConnection(e=An existing connection was forcibly closed by the remote host)
DEBUG [SocketController] 22 Dec 2014 09:44:22.737 : FTPConnection.2 Closed socket
DEBUG [TransferBuffer] 22 Dec 2014 09:44:22.737 : FTPConnection.2 Close() called when open
DEBUG [SecureSocket] 22 Dec 2014 09:44:22.737 : FTPConnection.2 OnHandshakeComplete(False,An existing connection was forcibly closed by the remote host)
ERROR [SecureSocket] 22 Dec 2014 09:44:22.737 : Exception during handshake: An existing connection was forcibly closed by the remote host
Here is the code for the download, with the code I just hard-coded for the SSL Version.
public void DownloadFile(FtpEntity ftp, string filePath, string remoteFileRename)
{
SecureFTPConnection ftpConnection = null;
SSHFTPClient sshConnection = null;
// TFS 44529 - RBM: Add EDT Logging.
EnterpriseDT.Util.Debug.Logger.CurrentLevel = ftp.FtpLogLevel;
if ((ftp.FtpLogLevel != EnterpriseDT.Util.Debug.Level.OFF) && (!String.IsNullOrEmpty(ftp.FtpRollingLogFile)))
{
ftpLoggingEnabled = true;
EnterpriseDT.Util.Debug.Logger.AddAppender(new EnterpriseDT.Util.Debug.RollingFileAppender(ftp.FtpRollingLogFile, 5000000, 5));
}
// End TFS 44529 - RBM: Add EDT Logging.
// RBM (TFS 31916): Code was not properly checking for the file.
string fileExistCheck = filePath;
if