EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTPClient UploadFIle()

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#16466
Posted: 05/18/2011 04:56:44
by Piotr Zwardon (Priority Standard support level)
Joined: 05/18/2011
Posts: 2

Hi guys,
I'm facing a problem with SFTPClient and I can't find an answer on your page.
I'm connecting to SFTP Server and I'm trying to upload files on it.
Code
static public void upload(string targetPath, string[] aFile, string userName, string password, string IPAddress)
            {
                    Connect(userName, password, IPAddress);
                    
                    if (SftpClient.Active)
                    {
                        try
                        {
                            string path = SftpClient.RequestAbsolutePath(@"/");
                            foreach (string s in aFile)//it is a list of files to upload
                            {
                                string shortName = System.IO.Path.GetFileName(s);
                                SftpClient.UploadFile(s, path + shortName, TSBSFTPFileTransferMode.ftmOverwrite);
                            }
                        }
                        catch (Exception ex)
                        {
                            ErrorLog.logMessage("Error during upload: " + ex.Message);
                        }
                        
                        Disconnect();
                    }
                }


It works fine for some time, but after that I'm receiving
Quote
- Connection failed due to exception: Connection failed (error code is 10035)

I can't find what 10035 code means. After that server crashes (code 10061) or it is running but it is impossible to connect to it even using SFTPClient demo app. I have also tried UploadFiles() method instead of UploadFile() but it doesn't help.

Looking for any suggestions.
Regards,
Piotr Zwardon
#16467
Posted: 05/18/2011 05:25:25
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Please follow this manual: http://www.eldos.com/security/articles/4796.php
You should pay attention to paragraph 5.

Reply

Statistics

Topic viewed 2958 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!