I'm using the webclient class in .net and I went to download a site.
Dim oWebClient As New WebClient()
Dim oDownloadedPage As String = oWebClient.DownloadString(<site>)
It tossed an authentication error after a little searching it turned out that the site I was trying to download must of disabled TLS1.0
So I changed the ServicePointManger to this
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 Or
SecurityProtocolType.Tls12 Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls
I got the same error.. So I decided to change it to this..
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 Or
SecurityProtocolType.Tls Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls12
See what I did there? I switched the order and then it worked.
Can someone explain to me what the difference is in the ordering? And why does it matters? I'm wondering if I go to download a TLS 1.0 site, if it will fail.