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

I am using the free version of edtftpnet to try and write an application to do simple file transfers to a server. I am able to connect to this server using other commercial FTP client products. I am also able to connect to it using the DOS command line. The following is my code and I have the connection set as passive. I am getting the above error and I am not sure why. I have checked the host name, username and password and they are correct. Is there any other setting on the FTPConnection class that could be limiting my abiltiy to get into this server.

I would like to try using the logging feature but I have not figured out how to get it to work. Does it not work on the free version? If it does and you can let me know how to use, that might be a place to start.

Dim localFile As String = Label1.Text
Dim host As String = TextBox1.Text
Dim username As String = TextBox2.Text
Dim password As String = TextBox3.Text

Try

' Set server and log-in properties
FtpConnection1.ServerAddress = host
FtpConnection1.ServerPort = 21
FtpConnection1.UserName = username
FtpConnection1.Password = password

' Connect, transfer files and close
FtpConnection1.Connect()
MsgBox(FtpConnection1.IsConnected)
FtpConnection1.Close()

Catch ex As Exception
If FtpConnection1.IsConnected Then
FtpConnection1.Close()
End If
MessageBox.Show(Me, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try

1 Answer

0 votes
by (162k points)
Try using active mode. Look at the LogLevel & LogFile properties for logging.

Categories

...