Happy New Year.
>> If this doesn't work, the "SslDataChannelCheckExplicitEncryptionRequest()" workaround is the way to go.
As per our previous discussion you suggested the above, and it seems to work ( no PROT P error now).
All I did was this -
//if (IsControlChannelEncrypted && !isImplicitSsl)
if ((sslSupportMode & ESSLSupportMode.ControlChannelRequested) != ESSLSupportMode.ControlChannelRequested)
However, I am getting the following error :-
No connection could be made because the target machine actively refused it
And here is the exception :- An exception of type 'System.Net.Sockets.SocketException' occurred in System.dll but was not handled in user code
Additional information: No connection could be made because the target machine actively refused it.
Here is my code same as previous time.
Here is my code (vb.net) -
Shared Function myCertificateValidation(ByVal sender As Object, ByVal certificate As X509Certificate, ByVal chain As X509Chain, ByVal sslPolicyErrors As SslPolicyErrors) As Boolean
Private Shared Function useFTPTransfer(ByVal autoSessionID As Integer, ByVal MySchoolID As Integer, ByVal FTPURL As String, ByVal Path As String, ByVal filename As String, ByVal userName As String, ByVal password As String) As String
Dim client As New FTPSClient()
client.Connect("Host Name", New NetworkCredential("user", "pass"), ESSLSupportMode.Implicit Or ESSLSupportMode.DataChannelRequested, New RemoteCertificateValidationCallback(AddressOf myCertificateValidation))
client.GetFile("/example1.txt", Path & filename)
I have opened ports 21 and 990 in my firewall.