Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.2k views
in .NET FTP by (120 points)
before trying to perform certain operations (like deleting a directory, for example), i'm checking to see if the ftp connection is connected. for some reason, IsConnected seems to be returning True even when it's not connecting. i end up with an exception: "The FTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established."

here's my code:

Using ftpConnection As New EnterpriseDT.Net.Ftp.FTPConnection
ftpConnection.ServerAddress = ***
ftpConnection.ServerPort = ***
ftpConnection.UserName = ***
ftpConnection.Password = ***
ftpConnection.Timeout = 30000
ftpConnection.ConnectMode = Net.Ftp.FTPConnectMode.ACTIVE

ftpConnection.Connect()
If ftpConnection.IsConnected Then
ftpConnection.DeleteDirectory(directoryName) ' <<< this executes and throws the error
End If
End Using


any ideas?

1 Answer

0 votes
by (162k points)
this may have been fixed in the next version - email us at support at enterprisedt dot com to get it. we'll release it soon.

Categories

...