I built the '5 minute ftp client'. It works well for some ftp servers but on others an error is thrown in a pop up after connection that reads: 'String was not recognized as a valid DateTime.'
Using the SecureFTPConnection Tester, the following text is shown after clicking the conect button:
"DEBUG : Connecting to 172.26.169.70:21
DEBUG : 172.26.169.70 resolved to 172.26.169.70
DEBUG : Connecting directly to ftp-server 172.26.169.70:21
DEBUG : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=172.26.169.70, controlPort=21, timeout=120000
DEBUG : 220 Treck FTP server ready.
ALL : Invoking delegate EnterpriseDT.Net.Ftp.FTPConnectionEventHandler -> EnterpriseDT.Net.Ftp.Design.ExFTPDesignerForm.connection_Connected
ALL : Have GUI control
ALL : GUI control invocation required
ALL : Invoking delegate asynchronously using GUI control
ERROR : Value cannot be null.
Parameter name: path : System.ArgumentNullException: Value cannot be null.
Parameter name: path
System.ArgumentNullException: Value cannot be null.
Parameter name: path
at System.IO.DirectoryInfo..ctor(String path)
at EnterpriseDT.Net.Ftp.Forms.FTPLocalFileList.RefreshFileList()
at EnterpriseDT.Net.Ftp.Forms.FTPLocalFileList.ftp_Connected(Object sender, FTPConnectionEventArgs e)
DEBUG : ---> USER test
DEBUG : Starting KeepAlive thread with period 30s
DEBUG : 331 User name okay, need password.
DEBUG : ---> PASS ********
DEBUG : 230 User logged in, proceed.
DEBUG : Successfully logged in
DEBUG : ---> TYPE I
DEBUG : 200 TYPE Command okay.
DEBUG : ---> PWD
DEBUG : 257 "/" is current directory.
ALL : Invoking delegate EnterpriseDT.Net.Ftp.FTPDirectoryEventHandler -> EnterpriseDT.Net.Ftp.Forms.FTPAnimation.ftp_DirectoryChanging
ALL : Have GUI control
ALL : GUI control invocation required
ALL : Invoking delegate synchronously using GUI control
ALL : Delegate invocation complete
DEBUG : ---> CWD /
DEBUG : 250 CWD requested file action okay, completed.
DEBUG : ---> PWD
DEBUG : 257 "/" is current directory.
ALL : Invoking delegate EnterpriseDT.Net.Ftp.FTPDirectoryEventHandler -> EnterpriseDT.Net.Ftp.Design.ExFTPDesignerForm.connection_DirectoryChanged
ALL : Have GUI control
ALL : GUI control invocation required
ALL : Invoking delegate asynchronously using GUI control
ALL : Dynamic delegate invocation complete
DEBUG : Task completed: Connect()
DEBUG : FTP task completed Connect()
DEBUG : Queuing FTP task GetFileInfos()
DEBUG : Starting FTP task processor
DEBUG : Running FTP task GetFileInfos()
DEBUG : Running task: GetFileInfos()
ALL : Invoking delegate EnterpriseDT.Net.Ftp.ExFTPConnection+a+a -> EnterpriseDT.Net.Ftp.ExFTPConnection+a.a
ALL : Have GUI control
ALL : Invoking delegate dynamically
ALL : Invoking delegate EnterpriseDT.Net.Ftp.FTPDirectoryListEventHandler -> EnterpriseDT.Net.Ftp.Forms.FTPStatusBar.ftp_DirectoryListing
ALL : Have GUI control
ALL : GUI control invocation required
ALL : Invoking delegate asynchronously using GUI control
DEBUG : ---> SYST
DEBUG : 215 UNIX Type: L8 Version: IPXOS .
DEBUG : Selected UNIX parser
DEBUG : ---> PWD
DEBUG : 257 "/" is current directory.
DEBUG : ---> PASV
DEBUG : 227 Entering Passive Mode (172,26,169,70,141,80).
DEBUG : Server supplied address=172.26.169.70
DEBUG : Server supplied port=36176
DEBUG : Substituting server supplied IP (172.26.169.70) with remote host IP (172.26.169.70)
DEBUG : NewPassiveDataSocket(172.26.169.70,36176)
DEBUG : Connecting directly to ftp-server 172.26.169.70:36176
DEBUG : Created passive data-socket: ProxyConnector=
DEBUG : ---> LIST
DEBUG : 150 File status okay; about to open data connection.
DEBUG : Reading ASCII listing data
DEBUG : -->drwx------ - root root 0 Jun 24 14:48 PROG-A
DEBUG : -->drwx------ - root root 0 Jun 24 14:48 DATA-B
DEBUG : -->drwx------ - root root 0 Jun 24 14:48 DATA-C
DEBUG : -->drwx------ - root root 0 Jun 24 14:48 PROG-D
DEBUG : 226 Closing data connection.
DEBUG : Found 4 listing lines
DEBUG : Parse() called using culture: Invariant Language (Invariant Country)
DEBUG : Failed to parse size: root
INFO : Rotated parser to Windows
ALL : Invoking delegate EnterpriseDT.Net.Ftp.FTPDirectoryListEventHandler -> EnterpriseDT.Net.Ftp.Forms.FTPStatusBar.ftp_DirectoryListed
ALL : Have GUI control
ALL : GUI control invocation required
ALL : Invoking delegate asynchronously using GUI control
DEBUG : Drilling into System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
ERROR : Error event while executing GetFileInfos - notifying Error event-handlers
ALL : Invoking delegate EnterpriseDT.Net.Ftp.FTPErrorEventHandler -> EnterpriseDT.Net.Ftp.Design.ExFTPDesignerForm.connection_Error
ALL : Have GUI control
ALL : GUI control invocation required
ALL : Invoking delegate asynchronously using GUI control
ERROR : Event-handlers notified successfully
DEBUG : FTP task completed GetFileInfos()
ERROR : Error while filling FTPRemoteFileList : System.NullReferenceException: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at EnterpriseDT.Net.Ftp.Forms.FTPRemoteFileList.ftp_DirectoryListed(Object sender, FTPDirectoryListEventArgs e)
ERROR : Connection Error : System.FormatException: String was not recognized as a valid DateTime.
System.FormatException: String was not recognized as a valid DateTime.
at System.DateTime.ParseExact(String s, String[] formats, IFormatProvider provider, DateTimeStyles style)
at EnterpriseDT.Net.Ftp.WindowsFileParser.Parse(String raw)
at EnterpriseDT.Net.Ftp.FTPFileFactory.Parse(String[] fileStrings)
at EnterpriseDT.Net.Ftp.FTPClient.DirDetails(String dirname)
at EnterpriseDT.Net.Ftp.FTPConnection.GetFileInfos(String directory)
at EnterpriseDT.Net.Ftp.FTPConnection.GetFileInfos()
DEBUG : Error while executing GetFileInfos. Calling ShowError delegate.
DEBUG : Showing error message-box
DEBUG : Error message-box shown successfully
"
The intersting part is that it is acually getting the default directory info as is shown by:
DEBUG : -->drwx------ - root root 0 Jun 24 14:48 PROG-A
DEBUG : -->drwx------ - root root 0 Jun 24 14:48 DATA-B
DEBUG : -->drwx------ - root root 0 Jun 24 14:48 DATA-C
DEBUG : -->drwx------ - root root 0 Jun 24 14:48 PROG-D
However, it cannot be displayed. Does anyone have any suggestions?
Thanks