Hi, I have the following code looping through:
Case 1 ' etc
ftpConn.ChangeWorkingDirectory(Convert.ToString(direc(x)))
For Each filename In etc_files
If ftpConn.Exists(filename) Then
txtResult.AppendText("Downloading file: " & Convert.ToString(direc(x)) & filename)
Try
ftpConn.DownloadFile(filename, filename)
Catch ex As Exception
MessageBox.Show(ex.Message)
Exit Sub
End Try
txtResult.AppendText("... Done!" & vbNewLine)
End If
Next
filename is a string, etc_files is an array of stringsm, ftpConn is a New FTPConnection
I get the message "Input string was not in a correct format." whenever it hits the downloadfile line on a particular FTP server. On some servers it works but on others it fails. On some other servers of the same type, it loops through this code twice before failing.
I should add that I've tried the suggestion from Bruce here: (
http://www.enterprisedt.com/forums/viewtopic.php?t=2966)
What I'm getting at, sorry for the waffle - does this appear to be a server issue or an EDTNet issue? See logs below...
ALL [FTPConnection] 12 Mar 2009 09:48:37.123 : Invoking delegate EnterpriseDT.Net.Ftp.FTPFileTransferEventHandler -> DebugGrabber.DebugGrabber.downloadedHandler
ALL [FTPConnection] 12 Mar 2009 09:48:37.123 : Have GUI control
ALL [FTPConnection] 12 Mar 2009 09:48:37.123 : GUI control invocation not required
ALL [FTPConnection] 12 Mar 2009 09:48:37.123 : Invoking delegate dynamically
ALL [FTPConnection] 12 Mar 2009 09:48:37.623 : Dynamic delegate invocation complete
DEBUG [HostNameResolver] 12 Mar 2009 09:49:04.810 : 172.17.250.33 resolved to 172.17.250.33
DEBUG [FTPClient] 12 Mar 2009 09:49:04.810 : Connecting to 172.17.250.33:21
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.810 : Setting socket timeout=120000
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.810 : Command encoding=System.Text.ASCIIEncoding
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.825 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.825 : 220 ADH FTP SERVER READY TYPE HELP FOR HELP
DEBUG [FTPConnection] 12 Mar 2009 09:49:04.825 : Connected to 172.17.250.33
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.825 : ---> USER dmftp
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.825 : 331 User name okay, need password.
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.825 : ---> PASS ********
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.825 : 230 User logged in, proceed.
DEBUG [FTPConnection] 12 Mar 2009 09:49:04.825 : Successfully logged in
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : ---> TYPE I
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : 200 Command okay.
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : ---> PWD
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : 257 "/hdd0".
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : ---> CWD /hdd0/etc/
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : 250 Requested file action okay, completed.
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : ---> PWD
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : 257 "/hdd0/etc".
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : ---> SIZE vidcfg.ini
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.841 : 213 4448
DEBUG [FTPConnection] 12 Mar 2009 09:49:04.841 : DownloadFile(vidcfg.ini,vidcfg.ini)
DEBUG [FTPConnection] 12 Mar 2009 09:49:04.857 : Combining absolute path 'C:\Documents and Settings\psumner\Desktop\172.17.250.33\' with relative path 'vidcfg.ini'
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.857 : ---> SIZE vidcfg.ini
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.857 : 213 4448
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.857 : ---> PASV
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.857 : 227 Entering Passive Mode (172,17,250,33,4,80)
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.857 : Server supplied address=172.17.250.33
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.857 : Server supplied port=1104
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.857 : Substituting server supplied IP (172.17.250.33) with remote host IP (172.17.250.33)
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.872 : NewPassiveDataSocket(172.17.250.33,1104)
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.872 : ---> RETR vidcfg.ini
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.872 : 150 File status okay; about to open data connection.
DEBUG [FTPClient] 12 Mar 2009 09:49:04.919 : Transferred 4448 bytes from remote host
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:04.919 : 226 Closing data connection. Transfer succeeded
ALL [FTPConnection] 12 Mar 2009 09:49:04.919 : Invoking delegate EnterpriseDT.Net.Ftp.FTPFileTransferEventHandler -> DebugGrabber.DebugGrabber.downloadedHandler
ALL [FTPConnection] 12 Mar 2009 09:49:04.919 : Finding MainWindowHandle
ALL [FTPConnection] 12 Mar 2009 09:49:05.685 : MainWindowHandle found
ALL [FTPConnection] 12 Mar 2009 09:49:05.685 : Have GUI control
ALL [FTPConnection] 12 Mar 2009 09:49:05.685 : GUI control invocation not required
ALL [FTPConnection] 12 Mar 2009 09:49:05.685 : Invoking delegate dynamically
ALL [FTPConnection] 12 Mar 2009 09:49:06.185 : Dynamic delegate invocation complete
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:06.185 : ---> SIZE paths.ini
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:06.185 : 550 Requested action not taken. Open error
DEBUG [FTPClient] 12 Mar 2009 09:49:06.185 : SIZE not supported
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:06.185 : ---> MDTM paths.ini
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:06.185 : 502 Command not implemented.
DEBUG [FTPClient] 12 Mar 2009 09:49:06.185 : MDTM not supported
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:06.185 : ---> PORT 172,17,106,48,8,184
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:06.185 : 200 Command okay.
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:06.185 : ---> RETR paths.ini
DEBUG [FTPControlSocket] 12 Mar 2009 09:49:06.200 : 550 paths.ini: No such file or directo