NET FTP Library
EnableSSL Property
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : EnableSSL Property
If true the FTP component connects via SSL using the AUTH TLS command. The remote FTP server must have an SSL certificate installed for the FTP server in order to use SSL.
Syntax
'Declaration
 
Public Overridable Property EnableSSL As System.Boolean
'Usage
 
Dim instance As FTP
Dim value As System.Boolean
 
instance.EnableSSL = value
 
value = instance.EnableSSL
public virtual System.bool EnableSSL {get; set;}
public read-write property EnableSSL: System.Boolean; virtual; 
public function get,set EnableSSL : System.boolean
public: __property virtual System.bool get_EnableSSL();
public: __property virtual void set_EnableSSL( 
   System.bool value
);
public:
virtual property System.bool EnableSSL {
   System.bool get();
   void set (    System.bool value);
}
Example
FTP ftp = new FTP(); //Trial Mode            
//FTP ftp = new FTP("place user name here", "place license key here");
 
// set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu"; // a hungarian university. change this to your ftp server
ftp.UserName = "anonymous"; // replace with your user name
ftp.Password = "user@mail.com"; // replace with your password
 
//Makes a secure transfer
ftp.EnableSSL = true;
System.Console.WriteLine("The ftp connection is {0}", ftp.EnableSSL == true ? "secure" : "not secure");
 
ftp.DownloadFile("a.txt", "a.txt");
Dim ftp As FTP = New FTP() 'Trial Mode
'FTP ftp = new FTP("place user name here", "place license key here");
 
' set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu" ' a hungarian university. change this to your ftp server
ftp.UserName = "anonymous" ' replace with your user name
ftp.Password = "user@mail.com" ' replace with your password
 
'Makes a secure transfer
ftp.EnableSSL = True
If ftp.EnableSSL = True Then
    System.Console.WriteLine("The ftp connection is {0}","secure")
Else
    System.Console.WriteLine("The ftp connection is {0}","not secure")
End If
 
ftp.DownloadFile("a.txt", "a.txt")
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FTP Class
FTP Members