Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.8k views
in .NET FTP by (160 points)
Hi,

I use edtFTPnet/Free 2

With VS2008 and C#.

With this code i have an TargetInvocationException exception.
The connect and log in is OK. Change directory is OK. GetFiles is OK.

    
string[] list = this.transfertFtp.Ftp.GetFiles("");
foreach (string s in list)
{
  this.lstboxFtpTestFtpConnexion.Items.Add("    Ftp file : " + s);
}
                  
FTPFile[] fileInfos;
fileInfos = this.transfertFtp.Ftp.GetFileInfos("/");



Thanks in advance.

1 Answer

0 votes
by (160 points)
The error is on DirectoryListing event handler.

I add :

if (e.FileInfos != null)
        do this
else
        do that

Categories

...