在我的应用程序中,我想检查客户端支持的安全协议。我有最新的.Net版本。
我的想法是将SecurityProtocol设置为SecurityProtocolType Tls1.2,如:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;我的问题是,如果客户端不支持TLS1.2,那么ServicePointManager(SecurityProtocol)是否会抛出不支持此版本的异常呢?
发布于 2017-02-28 09:46:27
是的,你应该得到一个NotSupportedException
在我过去做过的一些测试中,你会看到
未处理的异常:不支持请求的安全协议System.NotSupportedException:。(按System.Net.ServicePointManager.set_SecurityProtocol(SecurityProtocolType值计算)
https://stackoverflow.com/questions/42504580
复制相似问题