.net4.0預設只支援tls1.0
除了升級到.net4.5+之外,
可以在程式中加入
tls1~1.2
ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072;
或
ServicePointManager.SecurityProtocol = (SecurityProtocolType)4032;
即(192+768+3072)
TLS1.3 12288 (Hex 3000) (Experimental)
TLS1.2 3072 (Hex C00) (Default)
TLS1.1 768 (Hex 300) (Default)
TLS1 192 (Hex C0) (Default)
SSL3 48 (Hex 30)
SSL2 12 (Hex 0C)