When attempting to connect to an FTPS server, I get the ultimate error "Control channel unexpectedly closed ('' read so far)", but when looking at the trace messages I'm seeing a CryptographicException: "Couldn't acquire crypto service provider context (-2146885628)".
Here's a full dump of the connection attempt:
DEBUG [HostNameResolver] 12 Aug 2010 16:42:40.566 : partnerftp.destinationrewards.com resolved to 208.69.92.152
DEBUG [ExFTPControlSocket] 12 Aug 2010 16:42:40.566 : Connecting directly to ftp-server partnerftp.destinationrewards.com:990
ALL [AsyncResult] 12 Aug 2010 16:42:40.582 : WaitOne begin: 100 3
ALL [AsyncResult] 12 Aug 2010 16:42:40.613 : Notify setting completed: null 3
ALL [AsyncResult] 12 Aug 2010 16:42:40.613 : Notify setting wait: 3
ALL [SecureSocket] 12 Aug 2010 16:42:40.629 : Notify: SecureSocket.OnConnect
ALL [AsyncResult] 12 Aug 2010 16:42:40.629 : WaitOne end: True 3
DEBUG [SSLFTPControlSocket] 12 Aug 2010 16:42:40.629 : Beginning Ssl3 handshake.
DEBUG [SecureSocket] 12 Aug 2010 16:42:40.629 : Changing protocol to Ssl3
DEBUG [SSLFTPControlSocket] 12 Aug 2010 16:42:40.629 : Ssl3 handshake complete.
DEBUG [FTPControlSocket] 12 Aug 2010 16:42:40.629 : Setting socket timeout=120000
ALL [TransferBuffer] 12 Aug 2010 16:42:40.645 : TransferBuffer timeout=120000
ALL [SocketController] 12 Aug 2010 16:42:40.645 : SocketController timeout=120000
ALL [SecureSocket] 12 Aug 2010 16:42:40.645 : SecureSocket timeout=120000
ALL [TransferBuffer] 12 Aug 2010 16:42:40.645 : TransferBuffer timeout=120000
ALL [SocketController] 12 Aug 2010 16:42:40.645 : SocketController timeout=120000
ALL [SecureSocket] 12 Aug 2010 16:42:40.645 : SecureSocket timeout=120000
DEBUG [SocketController] 12 Aug 2010 16:42:40.645 : Processing hello
DEBUG [FTPControlSocket] 12 Aug 2010 16:42:40.660 : Command encoding=System.Text.ASCIIEncoding
DEBUG [ExFTPControlSocket] 12 Aug 2010 16:42:40.660 : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=partnerftp.destinationrewards.com, controlPort=990, timeout=120000
DEBUG [FTPControlSocket] 12 Aug 2010 16:42:40.691 : StrictReturnCodes=False
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : OnReceive - caught exception - closing
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : System.Security.Cryptography.CryptographicException: Couldn't acquire crypto service provider context (-2146885628)
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at RBnIOlBjVFqSM5QkpXO.yU5hc9BMvuDK9jCsygg.WWxBWdQLm(Int32& , String )
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at RBnIOlBjVFqSM5QkpXO.yU5hc9BMvuDK9jCsygg.s0ietbjkA()
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at fxQCwxqux7Uvwrlq7g.dcX1mF3cp0R5ZBwIYY.KMAB3CHiHX()
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at 0jdNlcVvUxMEGME52ln.TEYevwVoXDwoblmoJEo.SFkh5mlri(fMLXvZVOFUEMiSXZyCY )
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at 0jdNlcVvUxMEGME52ln.TEYevwVoXDwoblmoJEo.ProcessMessage(fMLXvZVOFUEMiSXZyCY )
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at qpixG0VABRrVjoFRJNn.RPwpKLVYXRsuSBiggJI.ntnBPBmxl(fZMc7srMYEm5aUKaAgM )
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at 94mIcTrrdO2xlCJgKCN.ErHIfJrVcLjodk470HE.LDqs27n6f(Byte[] , Int32 , Int32 )
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at JkwckgV11S5ygb63g2I.uYMLfQV9IPiWWObbMV0.nuCrPcbDH(Byte[] , Int32 , Int32 )
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at JkwckgV11S5ygb63g2I.uYMLfQV9IPiWWObbMV0.rjuVakhEY(Byte[] , Int32 , Int32 )
ERROR [SocketController] 12 Aug 2010 16:42:40.676 : at 58oqYmrsUZjR3i4dqGU.Ggbqc4rhIR4lFmgLZqE.ntnBPBmxl(IAsyncResult )
DEBUG [SocketController] 12 Aug 2010 16:42:40.738 : CloseConnection(e=Couldn't acquire crypto service provider context (-2146885628))
DEBUG [SocketController] 12 Aug 2010 16:42:40.738 : Shut down socket
DEBUG [SocketController] 12 Aug 2010 16:42:40.738 : Closed socket
DEBUG [TransferBuffer] 12 Aug 2010 16:42:40.738 : Close() called when open
DEBUG [SecureSocket] 12 Aug 2010 16:42:40.738 : OnHandshakeComplete(False,Couldn't acquire crypto service provider context (-2146885628))
ALL [AsyncResult] 12 Aug 2010 16:42:40.754 : Notify setting completed: null 4
ALL [AsyncResult] 12 Aug 2010 16:42:40.754 : Notify setting wait: 4
ERROR [FTPControlSocket] 12 Aug 2010 16:42:40.754 : Control channel unexpectedly closed ('' read so far)
orders|ControlChannelIOException when connecting: Control channel unexpectedly closed ('' read so far)
orders|Exception thrown when transmitting file: ControlChannelIOException:Control channel unexpectedly closed ('' read so far)
This is in a program that has been compiled in .Net 4.0. Unfortunately, I can't backport it to 3.5 anymore.
edtFTPnet/PRO connects just fine to other regular FTP sites, however.