Check FTP Connection using C#.Net
public static bool IsFTPConnected()
{
objFTPCon = new FTPConnection();
objFTPCon.ServerAddress = "Server address"
objFTPCon.UserName = "User Name"
objFTPCon.Password = "Password"
objFTPCon.ServerDirectory = "directory name"
if (objFTPCon.ServerAddress != "" && objFTPCon.UserName != "" && objFTPCon.Password != "")
{
objFTPCon.Login();
objFTPCon.Connect();
return true;
}
else
{
MessageBox.Show("Please Fill FTP Server Connection", "Staffing Solution");
return false;
}
}