Dev Direct Solution Center

For more information and to buy this product...

How to connect to an SFTP server from a .NET application using edtFTPnet/PRO

  For a copy of the sample project please click here to download and install the product evaluation.

Introduction

edtFTPnet/PRO is a powerful client library that allows programmers to enable their applications to communicate with SFTP servers. Directory listings and file and directory transfers are all easily performed. Seamlessly switch protocols to FTPS or FTP without rewriting code.

Detail

Below is a simple example of using edtFTPnet/PRO to connect to an SFTP server and list the current directory:

SecureFTPConnection ftpConnection = new SecureFTPConnection();
ftpConnection.ServerAddress = "servername";
ftpConnection.UserName = "edtuser";
ftpConnection.Password = "edtpassword";
ftpConnection.Protocol = FileTransferProtocol.SFTP;
ftpConnection.ServerValidation = SecureFTPServerValidationType.None;
ftpConnection.Connect();
string[] files = ftpConnection.GetFiles();
foreach (file in files)
  System.Console.WriteLine(file);
ftpConnection.Close();

Visit Enterprise Distributed Technologies for more information and more samples.