Im novice in .NET and I hope you help me.
I use edtftpnet-1.2.2 (freeware)
I need output all server messages in listbox.
I want to use events ReplyReceived and CommandSent.
Look at my code.
// ftpConnection1
//
this.ftpConnection1.AutoLogin = true;
this.ftpConnection1.ConnectMode = EnterpriseDT.Net.Ftp.FTPConnectMode.PASV;
this.ftpConnection1.DeleteOnFailure = true;
this.ftpConnection1.EventsEnabled = true;
this.ftpConnection1.ParsingCulture = new System.Globalization.CultureInfo("");
this.ftpConnection1.Password = null;
this.ftpConnection1.ServerAddress = null;
this.ftpConnection1.ServerPort = 21;
this.ftpConnection1.StrictReturnCodes = true;
this.ftpConnection1.Timeout = 0;
this.ftpConnection1.TransferBufferSize = 4096;
this.ftpConnection1.TransferNotifyInterval = ((long)(4096));
this.ftpConnection1.TransferType = EnterpriseDT.Net.Ftp.FTPTransferType.BINARY;
this.ftpConnection1.UserName = null;
this.ftpConnection1.ReplyReceived += new EnterpriseDT.Net.Ftp.FTPMessageHandler(this.ftpConnection1_ReplyReceived);
this.ftpConnection1.CommandSent += new EnterpriseDT.Net.Ftp.FTPMessageHandler(this.ftpConnection1_CommandSent);
...
private void ftpConnection1_CommandSent(object sender, EnterpriseDT.Net.Ftp.FTPMessageEventArgs e)
{
listBox1.Items.Add(e.Message.ToString());
}
private void ftpConnection1_ReplyReceived(object sender, EnterpriseDT.Net.Ftp.FTPMessageEventArgs e)
{
listBox1.Items.Add(e.Message.ToString());
}
I put breakpoint in ftpConnection1_CommandSent() and ftpConnection1_ReplyReceived()
I complitly download file but this events dont work.
Whats problem?