Subject: ComponentPro.Net.SftpException: Failure; Failure Date: 2017-07-18 13:56:18 From: Rahul - Source: componentpro-net-sftpexception-failure-failure ----------------------------------------------------------------------Hi,
I'm using ComponentPro.Sftp libraries in our C# application to connect to a remote server for sending and receiving files.
What is Successfully working:
1. Connecting to remote server using public/private key authentication
2. Sending files after successful connection to remote server
3. Viewing files, changing directories on remote server
Libraries:
1. ComponentPro.Common.dll (v 6.8.40.4155)
2. ComponentPro.FileSystem.dll (v 6.8.40.4155)
3. ComponentPro.Network.dll (v 6.8.40.4155)
4. ComponentPro.Sftp.dll (v 6.8.40.4155)
Things that are not working:
1. After we connect to remote server to fetch/get the file(flat file): Our application(using componentPro libraries) gets the file successfully and then application fails. So, after successful connection, we get the file on our local machine/server and after that our application catches exception of type "ComponentPro.Net.SftpException: Failure; Failure".
We included "ComponentPro.Diagnostics.XTrace" loggin to Verbose level and following is the result of it:
[07-05-2017 15:50:36.61] Debug - Response: SSH_FXP_DATA Id:12, Len: 1375 bytes)
Sftp: 1, Thread Id: 0 [07-05-2017 15:50:36.61] Debug - Info: 15 SSH read requests are in queue.
Sftp: 1, Thread Id: 0 [07-05-2017 15:50:36.61] Information - Response: SSH_FXP_STATUS Id: 13, Code: 4, Message: 'Failure'
Sftp: 1, Thread Id: 0 [07-05-2017 15:50:36.61] Debug - Info: 14 SSH read requests are in queue.
Sftp: 1, Thread Id: 0 [07-05-2017 15:50:36.61] Information - Response: SSH_FXP_STATUS Id: 14, Code: 4, Message: 'Failure'
[07-05-2017 15:50:36.61] Verbose - Ssh: Received packet SSH_MSG_CHANNEL_DATA (149 bytes).
5E 00 00 00 00 00 00 00 8C 00 00 00 18 65 00 00 00 11 00 00 00 04 00 00 00 07 46 61 69 6C 75 72 65 00 00 00
00 00 00 00 18 65 00 00 00 12 00 00 00 04 00 00 00 07 46 61 69 6C 75 72 65 00 00 00 00 00 00 00 18 65 00 00
00 13 00 00 00 04 00 00 00 07 46 61 69 6C 75 72 65 00 00 00 00 00 00 00 18 65 00 00 00 14 00 00 00 04 00 00
00 07 46 61 69 6C 75 72 65 00 00 00 00 00 00 00 18 65 00 00 00 15 00 00 00 04 00 00 00 07 46 61 69 6C 75 72
65 00 00 00 00
Sftp: 1, Thread Id: 0 [07-05-2017 15:50:36.61] Error - Info: ComponentPro.Net.SftpException: Failure; Failure.
at c_R1W.c_P4W(c_GQC c_EAD, Type c_HQB)
at c_R1W.c_F2W(UInt32 c_SFW, AsyncOperation c_DA)
at ComponentPro.Net.Sftp.c_UXM(Boolean c_YAM, ProgressFileItem c_X3K, Stream c_YYM, AsyncOperation c_M)
Code from our Application that download the file:
try {
SftpFileInfoCollection files = (SftpFileInfoCollection)client.ListDirectory("/", new NameSearchCondition(_ftpFileFilter), false); if (files.Count > 0) { foreach (var file in files) { client.DownloadFile(_ftpReceiveDirectory + file, receiveFilePath + file); } var movefile = client.ListName("/"); } else { Console.WriteLine("File Not Found"); } } catch (Exception ex) { Console.WriteLine("An error has occurred:"); Console.WriteLine(ex.Message); }
Thanks You
---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index