如何使用c#配置站点以使用TLS而不是SSL [英] How to configure the site to use TLS not SSL using c#
本文介绍了如何使用c#配置站点以使用TLS而不是SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我有一个使用网络服务的网站。在webservice能够通过ssl连接之前,现在它已经改变了,现在我需要强制它使用TLS。
任何人都可以帮助我解决这个问题。
我是否需要在代码或网络中做任何事情。
非常感谢
suman
Hi All
I have a website which uses a web service . Before the webservice was able to connect through ssl but now it has changed and now i need to force it to use TLS.
Can anyone help me out in this.
Do i need to do anything in the code or it's networking thing.
Many Thanks
suman
推荐答案
只需更改
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
到
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
Just Change
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
to
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
这篇关于如何使用c#配置站点以使用TLS而不是SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文