Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO

the log file says the upload has succeeded, but I cannot see the uploaded file

0 votes
136 views
asked May 3 in .NET FTP by GuidoG (120 points)
edited May 3 by GuidoG
I am trying to upload files in a winforms application (c# dotnet 4.6)

My code is very simple :

using (FTPConnection ftpConnection = new FTPConnection())
{
                        ftpConnection.ServerAddress = _ftpDefinition.Host;
                        ftpConnection.ServerPort = _ftpDefinition.Port;
                        ftpConnection.UserName = _ftpDefinition.UserName;
                        ftpConnection.Password = _ftpDefinition.PassWord;

                        FTPConnection.LogLevel = EnterpriseDT.Util.Debug.LogLevel.All;
                        FTPConnection.LogFile = @"C:\test\ftplog\ftp_log.txt";
 
                        ftpConnection.Connect();
                        ftpConnection.ChangeWorkingDirectory(remoteDir);
                        ftpConnection.UploadFile(localDir + fileName, fileName);
                        ftpConnection.Close();
}

From what I read in the logfile it looks like if the file has been transferred.
But if I look at the folder using an ftpclient (filezilla and Total Commander) then the file is not there.

Both FTP Clients cannot see it.
What can cause this and how to fix it ?

 

The entire log is here :

DEBUG [FTPConnection] 3 mei 2017 10:14:24.601 : Set LocalDirectory='C:\Development\Palm\gttXMLImportExportService\gttXMLImportExportService\gttXMLImportExportService\bin\Debug'
DEBUG [FTPClient] 3 mei 2017 10:14:24.601 : Connecting to ftp.dinetxs.com:10021
DEBUG [HostNameResolver] 3 mei 2017 10:14:24.601 : Resolving ftp.dinetxs.com
DEBUG [HostNameResolver] 3 mei 2017 10:14:24.611 : ftp.dinetxs.com resolved to 212.140.163.240
INFO [BaseSocket] 3 mei 2017 10:14:24.611 : Connecting to 212.140.163.240:10021 with timeout 120000 ms
DEBUG [BaseSocket] 3 mei 2017 10:14:24.661 : Successfully connected to 212.140.163.240:10021
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.661 : Setting socket timeout=120000
INFO [FTPControlSocket] 3 mei 2017 10:14:24.661 : Command encoding=System.Text.SBCSCodePageEncoding
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.661 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.711 : 220 Welcome to the DINET FTP Server.
DEBUG [FTPConnection] 3 mei 2017 10:14:24.711 : Connected to ftp.dinetxs.com (instance=0)
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.711 : ---> USER OMSFTP201
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.761 : 331 Now please specify password.
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.761 : ---> PASS ********
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.891 : 230 Welcome to the EPIC FTP service.
DEBUG [FTPConnection] 3 mei 2017 10:14:24.891 : Successfully logged in
INFO [FTPConnection] 3 mei 2017 10:14:24.891 : Auto FEAT disabled
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.891 : ---> TYPE I
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.941 : 200 Ok.
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.941 : ---> PWD
DEBUG [FTPControlSocket] 3 mei 2017 10:14:24.991 : 257 "/"
DEBUG [FTPConnection] 3 mei 2017 10:14:26.210 : ChangeWorkingDirectory('/In')
DEBUG [FTPControlSocket] 3 mei 2017 10:14:26.210 : ---> CWD /In
DEBUG [FTPControlSocket] 3 mei 2017 10:14:26.260 : 250 Current directory is now /In.
DEBUG [FTPControlSocket] 3 mei 2017 10:14:26.260 : ---> PWD
DEBUG [FTPControlSocket] 3 mei 2017 10:14:26.310 : 257 "/In"
DEBUG [FTPConnection] 3 mei 2017 10:14:28.441 : UploadFile(\\TS2012R2\PalmDocuments\EDI\Ford\GttToFord\temp\GTT_20170503_33078_3.EDI,GTT_20170503_33078_3.EDI,False)
DEBUG [FTPConnection] 3 mei 2017 10:14:28.441 : Cancel resume
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.441 : ---> REST 0
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.491 : 502 This command is not implemented on this server.
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.491 : Expected reply codes = [350] (strict=False)
DEBUG [FTPClient] 3 mei 2017 10:14:28.491 : REST failed which is ok (This command is not implemented on this server. (code=502))
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.491 : ---> PASV
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.571 : 227 (212,140,163,240,117,130)
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.571 : Server supplied address=212.140.163.240
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.571 : Server supplied port=30082
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.571 : autoPassiveIPSubstitution=True
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.571 : remoteAddr=212.140.163.240
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.571 : Substituting server supplied IP (212.140.163.240) with remote host IP (212.140.163.240)
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.571 : NewPassiveDataSocket(212.140.163.240,30082)
INFO [BaseSocket] 3 mei 2017 10:14:28.571 : Connecting to 212.140.163.240:30082 with timeout 120000 ms
DEBUG [BaseSocket] 3 mei 2017 10:14:28.621 : Successfully connected to 212.140.163.240:30082
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.621 : Connected
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.621 : ---> STOR GTT_20170503_33078_3.EDI
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.701 : 125 Data connection connected, starting transfer.
DEBUG [FTPClient] 3 mei 2017 10:14:28.701 : Closing source stream
DEBUG [FTPClient] 3 mei 2017 10:14:28.701 : Transferred 2304 bytes to remote host
DEBUG [FTPControlSocket] 3 mei 2017 10:14:28.801 : 226 Ok.
DEBUG [FTPConnection] 3 mei 2017 10:14:29.650 : Closing connection (instance=0)
DEBUG [FTPFileFactory] 3 mei 2017 10:14:29.650 : Defaulting to Unix parsing
DEBUG [FTPControlSocket] 3 mei 2017 10:14:29.650 : ---> QUIT
DEBUG [FTPControlSocket] 3 mei 2017 10:14:29.700 : 221 Service is closing.
commented May 3 by support2 (143,750 points)
Filezilla does cache directory listings, so make sure you close it and restart. Also ensure the file is going to the location you think it is.
commented May 3 by GuidoG (120 points)
I do close the connection in filezilla before retrieving a list so that should not be the problem. If I drag the file from explorer to filezilla than I can see that file, but not the file that is uploaded using this library. As for the location, I do see the correct changedir in the log file. I will upload the entire log.
commented May 3 by GuidoG (120 points)
I also tried with actually closing and restarting filezilla, still no changes. The file is still not there or not visible but the log keeps saying it has transferred the file.
commented May 3 by GuidoG (120 points)
I also tried with Total Commander and the same result. The log says the file is transfered, but both Total Commander and FileZilla cannot see it

1 Answer

0 votes
answered May 4 by EDT Support (41,570 points)
I'm sorry, but this is clearly a server issue.  Please contact the vendor of the server software.
commented May 4 by GuidoG (120 points)
I"m sorry but this is NO server issue. If it was a server issue than files I upload using FileZilla or TotalCommander would also be not visible. And that is not the case.

It is clearly an issue of the uploading library in my opinion.
commented May 10 by EDT Support (41,570 points)
I'm sorry.  I didn't mean to ignore your comment; it just got lost in my inbox.

Yes, I agree that it's strange that it works in FileZilla but not with edtFTPnet/PRO.  I missed that bit of information previously.

Have you got access to the server logs?  If so then it would be interesting to see if you can see the file being uploaded successfully, and if anything happens to it afterwards.
commented May 10 by GuidoG (120 points)
Unfortunate I do not have access to the logs of that server.
All I can do is use the webinterface of that company and retrieve a list of uploaded/downloaded files. In that list the files I have uploaded are present. That is how I know that the files did indeed uploaded. I asked the same question to this  company but have received no answer yet, except that this is a low priority ticket.
So I guess there is not much that we can do ?
commented May 10 by Admin (2,230 points)
Have you tried uploading using the command-line FTP client, ftp.exe?  After you upload the file, list the directory.  It will be interesting to see if the file is there.
commented May 10 by GuidoG (120 points)
No, but I did tried listing the directory using the command-line FTP client and it always resulted in a "hanging" command-line FTP client. I think it must be a combination of some exotic server setting and ftp client but without assistance from the company that manages the ftp server this will be difficult to solve.
commented May 10 by Admin (2,230 points)
Yeah, I think you might have to wait for support to get back to you.
...