Not sure if I am logging correctly, but I can see no difference between successful transfers and those that show corruption. Here is a section of log in case it shows some "setting" that could be changed to get more consistent transfers:
DEBUG [FTPConnection] 23 Sep 2012 15:40:04.170 : Set LocalDirectory='C:\Users\Paul\Documents\VB.NET 2012\SIGMA10\SSTV_RX_Images\bin\Debug'
DEBUG [FTPClient] 23 Sep 2012 15:40:04.170 : Connecting to ftp.classicsstv.com:21
DEBUG [HostNameResolver] 23 Sep 2012 15:40:04.170 : Resolving ftp.classicsstv.com
DEBUG [HostNameResolver] 23 Sep 2012 15:40:04.170 : ftp.classicsstv.com resolved to 79.170.44.37
INFO [BaseSocket] 23 Sep 2012 15:40:04.170 : Connecting to 79.170.44.37:21 with timeout 120000 ms
DEBUG [BaseSocket] 23 Sep 2012 15:40:04.170 : Successfully connected to 79.170.44.37:21
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.170 : Setting socket timeout=120000
INFO [FTPControlSocket] 23 Sep 2012 15:40:04.170 : Command encoding=System.Text.SBCSCodePageEncoding
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.170 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.388 : 220 FTP server ready
DEBUG [FTPConnection] 23 Sep 2012 15:40:04.388 : Connected to ftp.classicsstv.com (instance=12)
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.388 : ---> USER classicsstv.com
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.435 : 331 Password required for classicsstv.com
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.435 : ---> PASS ********
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.497 : 230 Login successful. Username & password correct; FTP unlocked.
DEBUG [FTPConnection] 23 Sep 2012 15:40:04.497 : Successfully logged in
INFO [FTPConnection] 23 Sep 2012 15:40:04.497 : Auto FEAT disabled
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.497 : ---> TYPE I
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.544 : 200 Type set to I
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.544 : ---> PWD
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.575 : 257 "/" is the current directory
DEBUG [FTPConnection] 23 Sep 2012 15:40:04.575 : UploadFile(C:\MMSSTV\History\History_for_test\201209041243.jpg,public_html/sigma_test/201209041243.jpg,False)
INFO [FTPConnection] 23 Sep 2012 15:40:04.575 : Cancel resume
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.575 : ---> REST 0
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.591 : 502 Command REST not allowed by policy.
INFO [FTPControlSocket] 23 Sep 2012 15:40:04.591 : Expected reply codes = [350] (strict=False)
DEBUG [FTPClient] 23 Sep 2012 15:40:04.591 : REST failed which is ok (Command REST not allowed by policy. (code=502))
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.591 : ---> PASV
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.638 : 227 Entering Passive Mode (79,170,44,37,243,92).
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.638 : Server supplied address=79.170.44.37
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.638 : Server supplied port=62300
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.638 : autoPassiveIPSubstitution=True
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.638 : remoteAddr=79.170.44.37
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.638 : Substituting server supplied IP (79.170.44.37) with remote host IP (79.170.44.37)
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.638 : NewPassiveDataSocket(79.170.44.37,62300)
INFO [BaseSocket] 23 Sep 2012 15:40:04.638 : Connecting to 79.170.44.37:62300 with timeout 120000 ms
DEBUG [BaseSocket] 23 Sep 2012 15:40:04.638 : Successfully connected to 79.170.44.37:62300
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.638 : Connected
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.638 : ---> STOR public_html/sigma_test/201209041243.jpg
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:04.731 : 150 Opening BINARY mode data connection for public_html/sigma_test/201209041243.jpg
DEBUG [FTPClient] 23 Sep 2012 15:40:04.731 : Closing source stream
DEBUG [FTPClient] 23 Sep 2012 15:40:04.731 : Transferred 45078 bytes to remote host
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:05.823 : 226 Transfer complete
DEBUG [FTPConnection] 23 Sep 2012 15:40:05.823 : Closing connection (instance=12)
DEBUG [FTPFileFactory] 23 Sep 2012 15:40:05.823 : Defaulting to Unix parsing
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:05.823 : ---> QUIT
DEBUG [FTPControlSocket] 23 Sep 2012 15:40:05.870 : 221 Goodbye.
All transfers appear to be identical. The example above happens to be one that corrupted the jpeg image but others are just the same.
My VB.Net code is very simple:
Dim ftp1 As New FTPConnection
ftp1.ServerAddress = txtFTPserver.Text
ftp1.UserName = txtFTPusername.Text
ftp1.Password = txtFTPpassword.Text
ftp1.Connect()
ftp1.UploadFile(sLocalPath, sServerPath)
ftp1.Close()
Any ideas much appreciated.
Paul.