EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Dropping bytes during file FTPS transfer

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
Posted: 11/06/2008 16:50:09
by Mark Belfer (Standard support level)
Joined: 09/15/2008
Posts: 8

Hi, I am using the TElSimpleFTPSClient.Send function to transfer small files to an FTPS site. However after the transfer is complete, the remote file is corrupt. It still has the same filesize, but the body of the file is missing bytes, and some bytes appear to be out of order. To make the file the same filesize, there are blanks appended to the end of the data.

I am using version 6.0 of the API.

Does anyone know of any settings that I can tweak that might help?

Posted: 11/06/2008 18:35:05
by Mark Belfer (Standard support level)
Joined: 09/15/2008
Posts: 8

Hi again,

I forgot to mention that the program is written in C#. I wrote a simple program that uploads an XML file, then downloads it to a different name. After it is done, the files are different.

Here is the example:

// Connect to host
TElSimpleFTPSClient FtpsClient = new TElSimpleFTPSClient();
FtpsClient.Address = txtHost.Text;
FtpsClient.Username = txtUserID.Text;
FtpsClient.Password = txtPassword.Text;
FtpsClient.Port = 21;

FtpsClient.Versions = SBConstants.Unit.sbSSL3 + SBConstants.Unit.sbTLS1 + SBConstants.Unit.sbTLS11;
FtpsClient.UseSSL = false;
FtpsClient.EncryptDataChannel = false;
FtpsClient.AuthCmd = SBSimpleFTPS.Unit.acAuto;
FtpsClient.PassiveMode = true;
FtpsClient.SSLMode = SBSimpleFTPS.Unit.smImplicit;

// Send a file
FileStream dsUpload = new FileStream("c:\\AAA.xml", FileMode.Open, FileAccess.Read);
FtpsClient.Send(dsUpload, "AAA.xml");

// Get the file we just sent
FileStream dsDownLoad = new FileStream("c:\\BBB.xml", FileMode.OpenOrCreate, FileAccess.Write);
FtpsClient.Receive("AAA.xml", dsDownLoad);

// Close connection to host
Posted: 11/06/2008 23:47:05
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

1) Does the problem occur with some particular server or with any server? Please specify the name of the software that runs on server side.
2) Does the problem occur with some particular file or with any file? Please specify (a) if ASCII or binary mode is used, (b) the size of the file being uploaded.
Posted: 11/07/2008 11:30:47
by Mark Belfer (Standard support level)
Joined: 09/15/2008
Posts: 8

Hi Innokentiy,

Thank you for your prompt response. The host is using software called "GlobalScape". Their helpdesk says that they are not compatible with all clients. For example, Filezilla and CoreFTP both seem to have this problem, but IpSwitch does not. Apparantly, GlobalScape produces "CuteFTP", which is also compatible.

I am sending flat ASCII text files. Smaller files (about 16K) succeed about 92% of the time, but production-sized files (about 160k) always seem to fail. I've manufactured a variety of test files and they are all affected.

So far, I've tried to slow down the transfer by adjusting the "OutgoingSpeedLimit" and "IncomingSpeedLimit" parameters but that hasn't helped. Also, I've tried running the test program from servers at our data center (which has a more robust network) but that hasn't helped either.

Thanks again for all of your help!

Posted: 11/07/2008 11:48:11
by Eugene Mayevski (EldoS Corp.)

Wonderful ... They product buggy software and push their client optimized for their bugs ...

Sincerely yours
Eugene Mayevski
Posted: 11/07/2008 11:48:43
by Eugene Mayevski (EldoS Corp.)

BTW I am wondering if you have the same problem with download or with upload only?

Sincerely yours
Eugene Mayevski
Posted: 11/07/2008 12:16:29
by Mark Belfer (Standard support level)
Joined: 09/15/2008
Posts: 8

Hi Eugene,

I just checked -- I successfully downloaded a production-sized file 5/5 times without failure.

I'm looking at my settings on the IpSwitch client -- something weird -- it says it's using port 990, not 21. I tried that port on my test program but couldn't connect.

Posted: 11/07/2008 12:25:55
by Eugene Mayevski (EldoS Corp.)

Port 990 is usually used for implicit TLS. You can use our component on this port as well, but you will need to change the settings (in the connection settings window).

Sincerely yours
Eugene Mayevski
Posted: 11/07/2008 12:48:22
by Mark Belfer (Standard support level)
Joined: 09/15/2008
Posts: 8

I thought that I was using Implicit TLS with the following line:

FtpsClient.SSLMode = SBSimpleFTPS.Unit.smImplicit;

There is no settings window -- I'm programming this using the TElSimpleFTPSClient .net class.

Perhaps I should be using the ElSimpleSSLClient class instead?

Posted: 11/07/2008 13:33:14
by Eugene Mayevski (EldoS Corp.)

No, you are doing everything right. Did you try the sample application? If you have a problem, it's a good idea to try with the sample. This way you know that the problem really exists, and that it can be reproduced and that the issue is not specific to your code.
Please check if the sample shows the same problems (and also try implicit TLS there). The sample is located in "<SecureBlackbox>.NET\Samples\C#\SSLBlackbox\FTPS\Client\" folder (and similar VB.NET folder).

Sincerely yours
Eugene Mayevski
Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.



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