This project is read-only.

How can I upload a file using TLS 1.0 Protocol?

Oct 22, 2014 at 6:38 AM
Edited Oct 23, 2014 at 10:56 AM
Hi All,

I am using the below code for uploading the files. We were asked to use TLS 1.0 Since SSL is no more supported. Could you please help me how can I use TLS 1.0?

Using client As New FTPSClient()
            client.Connect("", New NetworkCredential("xxxxx", "xxxxx"), ESSLSupportMode.CredentialsRequired Or ESSLSupportMode.DataChannelRequested)
            client.PutFile("E:\test.txt", "Abe" + "_Test" + DateTime.Now.ToString("yyyyMMddHH") + DateTime.Now.Ticks.ToString() + "." + "txt")
        End Using
Oct 23, 2014 at 10:55 AM
Hi All,

I found the solution.

There is a third party open source you can download from the url

you need to open this source and you will see a file FTPSClient.cs. Find the below line of code.

sslStream.AuthenticateAsClient(hostname, clientCertColl, SslProtocols.Default, sslCheckCertRevocation);

You will see SslProtocols.Default (by default it uses SSL3) you need to change this to SslProtocols.Tls

Now you are ready to upload a file with TLS protocol.

Now you can use the AlexPilotti.FTPS.Client.dll in your VB.NET by adding it to reference.

Using client As New FTPSClient()
client.Connect("", New NetworkCredential("XXXXX", "XXXXX"), ESSLSupportMode.CredentialsRequired Or ESSLSupportMode.DataChannelRequested)
client.PutFile("E:\test.txt","Test" + DateTime.Now.ToString("yyyyMMddHH") + DateTime.Now.Ticks.ToString() + "." + "txt")
End Using

Uploading via Ftp over TLS Protocol is done.