EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Download a file

Posted: 02/01/2012 05:45:03
by sean rogers (Basic support level)
Joined: 02/01/2012
Posts: 5


we are using SecureBlackBox

I am trying to download large xml files from our SFTP server using c#.

I started by using DownloadStream approach, but for large files this just hangs.

Could someone show me to an article or explain how to open/read/close a file please. I cant find any samples.(VB.net is fine)

Thanks very much.
Posted: 02/01/2012 05:50:45
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

Try to use a sequence of TElSimpleSftpClient.OpenFile/Read/CloseHandle methods.
Posted: 02/01/2012 05:54:32
by sean rogers (Basic support level)
Joined: 02/01/2012
Posts: 5


do you have any code examples of the OpenFile/Read/CloseHandle sequence?
Posted: 02/01/2012 06:00:47
by Vsevolod Ievgiienko (Team)

No but we have a good documentation on these methods. Please refer to this page for detailed information: http://www.eldos.com/documentation/sb...lient.html
Posted: 02/01/2012 06:03:37
by Eugene Mayevski (Team)

First of all, you are using very old version of SecureBlackbox. You should be able to get version 6.2 and most likely upgrade to versions 7.x. To do this, you need to assign the license ticket to your user account. The ticket itself and the procedure of it's use are specified in the registration e-mail that was sent to you upon license purchase.

Next, Samples folder includes samples for SFTP and this includes samples for file transfer.

In version 7 or even in 6.x (don't remember now) we introduced methods to download a file in one call (and much faster than using OpenFile/ReadFile/CloseHandle sequence).

Sincerely yours
Eugene Mayevski
Posted: 02/01/2012 06:28:41
by sean rogers (Basic support level)
Joined: 02/01/2012
Posts: 5

Thanks for replying.

This is the version we are Live with, I am just investigating why large files are not being downloaded.

The samples all use DownloadFile or DownloadStream which dont seem to work with files over a certain size.

I was hoping to find an example of how to read a file in chunks.

Posted: 02/01/2012 06:44:17
by Vsevolod Ievgiienko (Team)

Try to follow the instructions from this article: http://www.eldos.com/security/articles/4801.php Maybe it will help to solve your problem.
Posted: 02/01/2012 06:46:51
by Eugene Mayevski (Team)

Size doesn't matter for DownloadFile or DownloadStream. The problem must be somewhere else. Try instructions in the article, pointed to by Vsevolod.

Sincerely yours
Eugene Mayevski
Posted: 02/01/2012 07:14:17
by sean rogers (Basic support level)
Joined: 02/01/2012
Posts: 5

Thanks I am going to add the OnError handler and see if that catches anything.
The article also mentions SendKeepAlive() but I cant see this method on the Client, is it somewhere else?

Thanks for your time
Posted: 02/01/2012 07:53:54
by Vsevolod Ievgiienko (Team)

It seems that it is deprecated and removed. Try to make pipelining-related changes.



Topic viewed 2280 times

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


Back to top

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

Got it!