Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.9k views
in .NET FTP by (420 points)
Using version 2 of the free library..

Now I'm getting a bug with SetModTime. In some cases, every file I try this on will only have the Date set, not the time. This has come and gone. Any computer that it works for during one session, may or may not work for the next. It seams to be a per session issue, as it ALL works, or ALL fails. A Simple recompile doesn't fix this.

This occures from behind a firewall ( ISA 2000 or 2006 [ not sure of our work version ] ), or behind no firewall, or just behind a Linksys or Netgear internet box. I really can't pin down what is making this happen, as it seams to make no sense as to when it will appear. Sometimes recompiling will make it go away..

There also seams to be an issue with getting the remote file time as well. It seams to never return the seconds. I've noticed that the format in the FTPFile class is Data hh/mm. No seconds. Where do I make it also have seconds? It also appears to be rounded. 14:35:39 comes back as 14:30. FTPFile.Raw is: "-rw-r--r-- 1 ftp ftp 961 Mar 12 14:30 BackupFileList.xml". I'm guessing that may be a FTP Server setting?

Thanks for any help
--Geoff

2 Answers

0 votes
by (51.6k points)
Using version 2 of the free library..

Now I'm getting a bug with SetModTime. In some cases, every file I try this on will only have the Date set, not the time. This has come and gone. Any computer that it works for during one session, may or may not work for the next. It seams to be a per session issue, as it ALL works, or ALL fails. A Simple recompile doesn't fix this.

This occures from behind a firewall ( ISA 2000 or 2006 [ not sure of our work version ] ), or behind no firewall, or just behind a Linksys or Netgear internet box. I really can't pin down what is making this happen, as it seams to make no sense as to when it will appear. Sometimes recompiling will make it go away..

A DEBUG-level log might shed some light on this.
There also seams to be an issue with getting the remote file time as well. It seams to never return the seconds. I've noticed that the format in the FTPFile class is Data hh/mm. No seconds. Where do I make it also have seconds? It also appears to be rounded. 14:35:39 comes back as 14:30. FTPFile.Raw is: "-rw-r--r-- 1 ftp ftp 961 Mar 12 14:30 BackupFileList.xml". I'm guessing that may be a FTP Server setting?

Yes, we simply return what the server send, so it depend on the server.

- Hans (EnterpriseDT)
0 votes
by (420 points)
This is not a complete log..


When Creating.. ( 82991.144170 is the file name, and I upload with .FTU, and rename on success )
........
DEBUG [FTPClient] 13 Mar 2009 10:32:53.963 : Found 2 listing lines
DEBUG [FTPFileFactory] 13 Mar 2009 10:32:53.963 : Parse() called using culture: Invariant Language (Invariant Country)
DEBUG [FTPControlSocket] 13 Mar 2009 10:32:53.964 : ---> PASV
........
DEBUG [FTPControlSocket] 13 Mar 2009 10:51:21.551 : ---> STOR 82990.144170.FTU
DEBUG [FTPControlSocket] 13 Mar 2009 10:51:21.603 : 150 Connection accepted
DEBUG [FTPClient] 13 Mar 2009 10:51:21.604 : Closing source stream
DEBUG [FTPClient] 13 Mar 2009 10:51:21.607 : Transferred 256 bytes to remote host
DEBUG [FTPControlSocket] 13 Mar 2009 10:51:21.658 : 226 Transfer OK
DEBUG [FTPControlSocket] 13 Mar 2009 10:51:21.659 : ---> RNFR 82990.144170.FTU
DEBUG [FTPControlSocket] 13 Mar 2009 10:51:21.749 : 350 File exists, ready for destination name.
DEBUG [FTPControlSocket] 13 Mar 2009 10:51:21.749 : ---> RNTO 82990.144170
DEBUG [FTPControlSocket] 13 Mar 2009 10:51:21.814 : 250 file renamed successfully
DEBUG [FTPControlSocket] 13 Mar 2009 10:51:21.815 : ---> MFMT 20090210193526 82990.144170
DEBUG [FTPControlSocket] 13 Mar 2009 10:51:21.867 : 213 modify=20090210193526; /_sgvault/82990.144170


Now when checking for more recent..
DEBUG [FTPClient] 13 Mar 2009 10:52:59.357 : Reading ASCII listing data
DEBUG [FTPClient] 13 Mar 2009 10:52:59.359 : -->-rw-r--r-- 1 ftp ftp 256 Feb 10 15:35 82990.144170
DEBUG [FTPClient] 13 Mar 2009 10:52:59.359 : -->-rw-r--r-- 1 ftp ftp 1204 Feb 10 15:35 82991.144270
DEBUG [FTPClient] 13 Mar 2009 10:52:59.360 : -->-rw-r--r-- 1 ftp ftp 227 Feb 10 15:35 state
DEBUG [FTPControlSocket] 13 Mar 2009 10:52:59.360 : 226 Transfer OK
DEBUG [FTPClient] 13 Mar 2009 10:52:59.360 : Found 3 listing lines
DEBUG [FTPFileFactory] 13 Mar 2009 10:52:59.361 : Parse() called using culture: Invariant Language (Invariant Country)
File \_sgvault\82990.144170 has a remote date of 2/10/2009 3:35:00 PM and a local date of 2/10/2009 2:35:26 PM <------ My debug out


From the ASCII Output of the "List" command, I'm guessing the remote FTP Server is NOT set up for seconds. I'll have to get on this weekend and see if there is an option to output seconds, otherwise I guess I'll have to just compair down to minutes. However, I still can't figure out the hour diff between the local and remote file dates.

Paid work is getting in the way, so I haven't had too much time for trying to replicate the other bug. I'll get back to you on that one when I get a good log.

Categories

...