您的位置:首页 > 其它

让.NET 4.0支持TLS1.2协议

2016-09-02 17:00 183 查看
TheDEFAULT
System.Net.ServicePointManager.SecurityProtocol
inboth.NET
4.0/4.5
is:

SecurityProtocolType.[b]Ssl3
|SecurityProtocolType.Tls.[/b]

.NET4.0
supportsupto
TLS1.0
while
.NET4.5
supportsupto
TLS1.2


However,anapplicationtargeting
.NET4.0
canstillsupportupto
TLS1.2
if
.NET4.5
isinstalledinthesameenvironment.
.NET4.5
installsontopof
.NET4.0
,replacing
System.dll
.

I'veverifiedthisbyobservingthecorrectsecurityprotocolsetintrafficwith
fiddler4
andbymanuallysettingtheenumeratedvaluesina
.NET4.0
project:

ServicePointManager.SecurityProtocol=(SecurityProtocolType)192|(SecurityProtocolType)768|(SecurityProtocolType)3072;



                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐