SftpBrowserWeb fails with 1 GB File

0 votes
asked 4 days ago by jraggio (120 points)

I am evaluating REBEX SFTP and I am running your SftpBrowserWeb_VB sample, when I am selecting an small file (under 100 mb) the upload is working fine, when I am selecting a file bigger than 500 MB I am getting a message:

The Connection was reset

any advise will be appreciated.

Jorge

Applies to: Rebex SFTP

1 Answer

0 votes
answered 1 day ago by Lukas Matyska (46,810 points)

I suppose that "The Connection was reset" error was generated by your web browser. It is not a .NET exception raised by the Rebex SFTP component.

If my assumption is correct, the error is caused by long activity on Web server (file is uploading to SFTP server for very long time) and the client (Web browser) did receive no response from Web server for very long time. After some period the Web browser give up to wait for Web server response and displayed "The Connection was reset".

This is know feature of the SftpBrowserWeb sample. The primary purpose of the sample is showing the usage of Rebex.Net.Sftp class. The sample has no purpose to implement advanced FileUpload control, which is much more complicated task not related to usage of Rebex classes.

The suggested solution is to use an advanced FileUpload control instead of standard System.Web.UI.WebControls.FileUpload control. Such control should be able to provide uploaded data on the fly (on the side of Web server) and keep the Web browser notified about the progress for whole time. You can ask for recommendations for such control in a Web developer community e.g. on https://stackoverflow.com.

If the error was raised by the Rebex SFTP component, please create communication log and post it here or send it to support@rebex.net for analysis. It can be created like this:

_sftp.LogWriter = new Rebex.FileLogWriter("c:/data/sftp.log", LogLevel.Debug);
...