I am using below code to connect and disconnect.
var a = new FileTransferClient();
a.LogWriter = new Rebex.FileLogWriter(@"C:\logs\ftplog.txt");
a.FtpPassiveMode = true;
await a.ConnectAsync("localhost", 21, FileTransferMode.Ftp);
await a.LoginAsync("admin", "****");
await a.DisconnectAsync();
//a.Disconnect();
await a.ConnectAsync("localhost", 21, FileTransferMode.Ftp);
await a.LoginAsync("root", "****");
I verified and found that it's problem with DisconnectAsync(). If I use Disconnect it works fine without any error.
Why is it so and how can I work around this?