Anyone else have DirDetails not returned a correct directory listing?
If I do a DirDetails and then put a file to the remote server and then do a DirDetails right after the put the second DirDetails returns the same file listing as the first DirDetails, the uploaded file isn't in the listing although it is on the server, I can even close the connection using quit and reconnect and the new DirDetails doesn't show the uploaded file.
However, if I exit and restart my application the first DirDetails will show the uploaded file. This same behavior happens then if I delete the uploaded file from the remote. A DirDetails after a delete still shows the file, but if I issue a delete command again I will get a file not found error. AND THEN then DirDetails will display a correct listing.
The following are the commands I'm issuing in my code after a connection:
// Get a directory listing
txtRemoteDir.Text = ftp.Pwd();
FTPFile[] ftpFile = ftp.DirDetails(txtRemoteDir.Text);
// Upload a file
ftp.TransferType = FTPTransferType.BINARY;
ftp.Put(localFile, FileBeingTransfered);
// Get the new directory listing
txtRemoteDir.Text = ftp.Pwd();
FTPFile[] ftpFile = ftp.DirDetails(txtRemoteDir.Text);
And heres the log:
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:34:55.874 : ---> PWD
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:34:55.937 : 257 "/c:/webhost4life aspnet/cohcc" is current directory.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:34:55.937 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:34:55.999 : 227 Entering Passive Mode (66,102,130,66,13,72)
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:34:56.062 : ---> LIST /c:/webhost4life aspnet/cohcc
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:34:56.171 : 150 Opening ASCII mode data connection for /bin/ls.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:34:56.359 : 226-Maximum disk quota limited to 300000 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:34:56.374 : Used disk quota 105169 Kbytes, available 194830 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:34:56.374 : 226 Transfer complete.
INFO [RoysFTP.MainForm] 26 Mar 2005 10:34:56.374 : DirDetails returned 52 files.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:00.671 : ---> TYPE I
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:00.734 : 200 Type set to I.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:00.734 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:00.812 : 227 Entering Passive Mode (66,102,130,66,13,73)
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:00.874 : ---> STOR parcel.jpg
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:00.952 : 150 Opening BINARY mode data connection for parcel.jpg.
DEBUG [RoysFTP.MainForm] 26 Mar 2005 10:35:00.952 : Transfer Started
DEBUG [RoysFTP.MainForm] 26 Mar 2005 10:35:00.952 : Transferred: 8192
DEBUG [RoysFTP.MainForm] 26 Mar 2005 10:35:01.281 : Transferred: 16384
DEBUG [RoysFTP.MainForm] 26 Mar 2005 10:35:03.437 : Transfer Complete
DEBUG [EnterpriseDT.Net.Ftp.FTPClient] 26 Mar 2005 10:35:03.437 : Transferred 98844 bytes to remote host
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:03.562 : 226-Maximum disk quota limited to 300000 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:03.812 : Used disk quota 105266 Kbytes, available 194733 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:03.812 : 226 Transfer complete.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:03.812 : ---> PWD
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:03.874 : 257 "/c:/webhost4life aspnet/cohcc" is current directory.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:03.890 : ---> PASV
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:03.952 : 227 Entering Passive Mode (66,102,130,66,13,77)
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:04.015 : ---> LIST /c:/webhost4life aspnet/cohcc
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:04.077 : 150 Opening ASCII mode data connection for /bin/ls.
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:05.140 : 226-Maximum disk quota limited to 300000 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:05.312 : Used disk quota 105266 Kbytes, available 194733 Kbytes
DEBUG [EnterpriseDT.Net.Ftp.FTPControlSocket] 26 Mar 2005 10:35:05.327 : 226 Transfer complete.
INFO [RoysFTP.MainForm] 26 Mar 2005 10:35:05.327 : DirDetails returned 52 files.
Thanks,