The code below is how to upload a file using ssl. EnableSSL = true; is this what you were looking for?
private NetworkCredential FtpLogin()
{
return new NetworkCredential(FtpUser, FtpPass);
}
public void Put(string filename)
{
FtpWebRequest requestFTPUploader = (FtpWebRequest)WebRequest.Create(string.Format(@"{0}/{1}", FtpServer, Path.GetFileName(filename)));
requestFTPUploader.Credentials = FtpLogin();
requestFTPUploader.Method = WebRequestMethods.Ftp.UploadFile;
requestFTPUploader.EnableSsl = true;
FileInfo fileInfo = new FileInfo(filename);
FileStream fileStream = fileInfo.OpenRead();
int bufferLength = 2048;
byte[] buffer = new byte[bufferLength];
Stream uploadStream = requestFTPUploader.GetRequestStream();
int contentLength = fileStream.Read(buffer, 0, bufferLength);
while (contentLength != 0)
{
uploadStream.Write(buffer, 0, contentLength);
contentLength = fileStream.Read(buffer, 0, bufferLength);
}
uploadStream.Close();
fileStream.Close();
requestFTPUploader = null;
}