I might be tripping but all of my attempts to run this method throw a TimeoutException. I can connect to the GoDaddy FTP server via FileZilla so I probably missing something here…
Code:
public void Connect()
{
this.FluentClient.Config.RetryAttempts = 5;
this.FluentClient.Config.EncryptionMode = FtpEncryptionMode.Implicit;
this.FluentClient.Config.DataConnectionEncryption = true;
this.FluentClient.Config.ValidateAnyCertificate = true;
this.FluentClient.Config.DataConnectionType = FtpDataConnectionType.AutoActive;
this.FluentClient.Config.DownloadDataType = FtpDataType.Binary;
this.FluentClient.Config.SocketKeepAlive = true;
this.FluentClient.Config.StaleDataCheck = true;
this.FluentClient.Config.ConnectTimeout = 3000;
this.FluentClient.Config.ReadTimeout = 30000;
this.FluentClient.Config.DataConnectionConnectTimeout = 30000;
this.FluentClient.Config.DataConnectionReadTimeout = 30000;
this.FluentClient.Connect();
}
Configuration:
- NET Framework 4.7.2
- FluentFTP 50.0.1
- GoDaddy Managed WordPress FTP
Additional Notes
I can connect to the FTP account via FileZilla. There was a note in the documentation of GoDaddy that the connection mode should be set to active.
Note: Our Web Hosting, Web Hosting Plus, and Windows Hosting plans support passive mode FTP. This setting can be managed in most FTP apps and website design software that support publishing with FTP. Managed WordPress uses SFTP, which only supports active mode, so no changes need to be made to the active mode setting in your FTP app.
What is even more interesting that I get the timeout error when I attempt to login via cmd.