vb.net - .NET and ServicePointManager.SecurityProtocol -
i'm using webclient class in .net , went download site.
dim owebclient new webclient() dim odownloadedpage string = owebclient.downloadstring(<site>)
it tossed authentication error after little searching turned out site trying download must of disabled tls1.0
so changed servicepointmanger this
servicepointmanager.securityprotocol = securityprotocoltype.ssl3 or securityprotocoltype.tls12 or securityprotocoltype.tls11 or securityprotocoltype.tls
i got same error.. decided change this..
servicepointmanager.securityprotocol = securityprotocoltype.ssl3 or securityprotocoltype.tls or securityprotocoltype.tls11 or securityprotocoltype.tls12
see did there? switched order , worked.
can explain me difference in ordering? , why matters? i'm wondering if go download tls 1.0 site, if fail.
Comments
Post a Comment