EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElSimpleSFTPClient.UploadFile & DownloadFile

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.
Posted: 07/04/2007 04:01:36
by Perin Sebastien (Basic support level)
Joined: 06/20/2006
Posts: 8


I use SBB version for .NET compact framwork on WinCE 5 (language : C#).

Sorry but I didn't take lots of time to look on the forum if my problem is already solved. Here is my trouble of the day :
Firts the download/upload methods of my application was written by someone else than me and he didn't use TElSimpleSFTPClient.UploadFile & DownloadFile. He did it programatically on a lower level ...

I'd like to use use TElSimpleSFTPClient.UploadFile & DownloadFile now ... But I get those exceptions :

[04/07/2007 10:42:35] : Error coccured while dowbnloading /axr/flux/GCO/out/PDA/Cessions/TPI.CESSIONS.2007_06_20_22_12_49.420.zip from remote server to \Storage Card\workdatas\import\TPI.CESSIONS.2007_06_20_22_12_49.420.zip
Type = [System.IndexOutOfRangeException]
Message = [IndexOutOfRangeException]
StackTrace = [at System.String.get_Chars()
at SBUtils.__Global.LastSeparatorPos()
at SBUtils.__Global.ExtractFilePath()
at SBSimpleSftp.TElSimpleSFTPClient.DownloadFile()
at SBSimpleSftp.TElSimpleSFTPClient.DownloadFile()
at FileFwk.FileTransfert.DownloadManager.download()

method call :
_sftp_connection.TheClient.DownloadFile(homeDir + fileName, Constants.FILES_IMPORT_PATH + fileName);



[04/07/2007 10:43:58] : Error occured while uploading /axr/flux/PDA/out/log/DEBUG_LOG_MAG-420_TPI-9_2007_07_03_17_00_44.log from \Storage Card\workdatas\log\DEBUG_LOG_MAG-420_TPI-9_2007_07_03_17_00_44.log to remote server
Type = [System.ArgumentOutOfRangeException]
Message = [ArgumentOutOfRangeException]
StackTrace = [at System.Buffer.BlockCopyInternal()
at SBUtils.__Global.Move()
at SBSftp.TElSftpClient.SendWrite()
at SBSftp.TElSftpClient.HandleTransferManagerWriteRequest()
at SBSftpCommon.TElSftpTransferManager.FlushNextRequestSet()
at SBSftpCommon.TElSftpTransferManager.Run()
at SBSftp.TElSftpClient.Write()
at SBSftp.TElSftpClient.WriteSync()
at SBSimpleSftp.TElSimpleSFTPClient.Write()
at SBSimpleSftp.TElSimpleSFTPClient.UploadStream()
at SBSimpleSftp.TElSimpleSFTPClient.UploadFile()
at FileFwk.FileTransfert.UploadManager.Upload()

method call :
_sftp_connection.TheClient.UploadFile(LocalFile, DestinationPath + LocalFile.Substring(LocalFile.LastIndexOf(@"\")+1), SBSftpCommon.TSBSFTPFileTransferMode.ftmOverwrite);

The paths display in the log trace are the ones passed as arguments to the UploadFile & DownloadFile methods.
... So :
May the TSBSFTPFileTransfertMode is not well set for one or the both methods ?
May I forgot to set a configuration property of the client ?
May my paths too long ?
May the path don't work cause it's an unix path and the device which try to connect run on Windows CE ?

Thanks a lot in advance for your help !!!
Posted: 07/04/2007 07:01:07
by Eugene Mayevski (EldoS Corp.)

IIRC there was a bug in .NET version when parsing the path. I don't remember the details, but SBB 5 fixes this bug.

Sincerely yours
Eugene Mayevski
Posted: 07/04/2007 07:03:57
by Perin Sebastien (Basic support level)
Joined: 06/20/2006
Posts: 8

Thanks for information Eugene.

I'll get back to the previous work of my collegue

Sincelery Yours,
Sebastien Perin



Topic viewed 2992 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!