Hi All,
I just try to use download directory method. I have succeeded to download some directories indeed. However i am getting errors while downloading some directories.
The code is like that
SecureFTPConnection connection = new SecureFTPConnection();
connection.Protocol = FileTransferProtocol.FTPSExplicit;
connection.ServerAddress = this.host;
connection.ServerPort = this.port;
connection.UserName = this.username;
connection.Password = this.password;
connection.Timeout = 5000000;
connection.ServerValidation = SecureFTPServerValidationType.None;
SecureFTPConnection.LogLevel = EnterpriseDT.Util.Debug.LogLevel.All;
SecureFTPConnection.LogFile = @"\\tekdplf1\NetDeployment\Sources\Test\Log.txt";
connection.Connect();
connection.DownloadDirectory(localDirectory, remoteDirectory);
The Error Trace:
INFO [SSLFTPSocket] 20 Oca 2016 12:59:58.862 : Connecting to [FTP_IP_ADDRESS]:51157 with timeout 5000000 ms
DEBUG [ExFTPPassiveDataSocket] 20 Oca 2016 12:59:58.862 : Created passive data-socket: ProxyConnector=
DEBUG [SSLFTPPassiveDataSocket] 20 Oca 2016 12:59:58.862 : Created passive data-socket: Protocol=Ssl3, Tls1, Tls11, CompatibilityFlags=Standard, UseSSLClosure=True, WaitOnClose=True
ALL [SecureSocket] 20 Oca 2016 12:59:58.862 : SecureSocket timeout=5000000
ALL [SecureSocket] 20 Oca 2016 12:59:58.862 : SecureSocket timeout=5000000
DEBUG [FTPControlSocket] 20 Oca 2016 12:59:58.862 : ---> RETR System.Net.Http.dll
ALL [SocketController] 20 Oca 2016 12:59:58.877 : WaitUntilCompleted(1765, EndSend)
ALL [AsyncResult] 20 Oca 2016 12:59:58.877 : Notify setting completed: null 1765
ALL [AsyncResult] 20 Oca 2016 12:59:58.877 : Notify setting wait: 1765
ALL [AsyncResult] 20 Oca 2016 12:59:58.877 : WaitOne completed: 1765
WARN [SocketController] 20 Oca 2016 12:59:58.908 : OnReceive - (An existing connection was forcibly closed by the remote host) - closing
DEBUG [SocketController] 20 Oca 2016 12:59:58.910 : CloseConnection(e=An existing connection was forcibly closed by the remote host)
DEBUG [SocketController] 20 Oca 2016 12:59:58.910 : Closed socket
ALL [AsyncResult] 20 Oca 2016 12:59:58.911 : Notify setting completed: An existing connection was forcibly closed by the remote host 1765
ALL [AsyncResult] 20 Oca 2016 12:59:58.912 : Notify setting wait: 1765
ALL [SocketController] 20 Oca 2016 12:59:58.912 : Notified active send result 1765
DEBUG [TransferBuffer] 20 Oca 2016 12:59:58.914 : Close() called when open
DEBUG [SecureSocket] 20 Oca 2016 12:59:58.914 : OnHandshakeComplete(False,An existing connection was forcibly closed by the remote host)
WARN [SecureNetworkStream] 20 Oca 2016 12:59:58.962 : Socket.Send() failed: An error occurred while communicating with the remote host.
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : Exception in SendCommand
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : System.IO.IOException: An I/O exception occurred.
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : at TDXAJl3QrLwq936QWgG.Rg2rMV3j8dir2aCcrGs.Write(Byte[] , Int32 , Int32 )
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : at System.IO.StreamWriter.Flush()
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : at EnterpriseDT.Net.Ftp.FTPControlSocket.rbgstCdlveS(String command)
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : CAUSED BY - EnterpriseDT.Mentalis.Security.SecurityException: An I/O exception occurred.
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : at EMbTMu3glxCCwTCq4tB.B7VOWR3rZM1FhGCgkmy.RgYsmw86ORT(IAsyncResult )
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : at EMbTMu3glxCCwTCq4tB.B7VOWR3rZM1FhGCgkmy.Send(Byte[] , Int32 , Int32 , SocketFlags )
ERROR [FTPControlSocket] 20 Oca 2016 12:59:58.976 : at TDXAJl3QrLwq936QWgG.Rg2rMV3j8dir2aCcrGs.Write(Byte[] , Int32 , Int32 )
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : Command error
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : System.IO.IOException: An I/O exception occurred.
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : at TDXAJl3QrLwq936QWgG.Rg2rMV3j8dir2aCcrGs.Write(Byte[] , Int32 , Int32 )
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : at System.IO.StreamWriter.Flush()
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : at EnterpriseDT.Net.Ftp.FTPControlSocket.rbgstCdlveS(String command)
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : CAUSED BY - EnterpriseDT.Mentalis.Security.SecurityException: An I/O exception occurred.
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : at EMbTMu3glxCCwTCq4tB.B7VOWR3rZM1FhGCgkmy.RgYsmw86ORT(IAsyncResult )
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : at EMbTMu3glxCCwTCq4tB.B7VOWR3rZM1FhGCgkmy.Send(Byte[] , Int32 , Int32 , SocketFlags )
ERROR [FTPConnection] 20 Oca 2016 12:59:58.983 : at TDXAJl3QrLwq936QWgG.Rg2rMV3j8dir2aCcrGs.Write(Byte[] , Int32 , Int32 )
DEBUG [FTPConnection] 20 Oca 2016 12:59:58.990 : Closing connection (instance=0)