Hi All,
I found the solution.
There is a third party open source you can download from the url https://ftps.codeplex.com/
you need to open this source and you will see a file FTPSClient.cs. Find the below line of code.
//sslStream.AuthenticateAsClient(hostname);
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("ftp.XXXXX.com", 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.
I found the solution.
There is a third party open source you can download from the url https://ftps.codeplex.com/
you need to open this source and you will see a file FTPSClient.cs. Find the below line of code.
//sslStream.AuthenticateAsClient(hostname);
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("ftp.XXXXX.com", 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.