简体   繁体   English

异常:不支持请求的安全协议 c#

[英]Exception : The requested security protocol is not supported c#

Exception : The requested security protocol is not supported c#.例外:请求的安全协议不受 c# 支持。

My application is using .net framework 3.5 and run on server windows 2012 R2.我的应用程序使用 .net framework 3.5 并在服务器 Windows 2012 R2 上运行。 After i started getting exception "The underlying connection was closed: An unexpected error occurred on a send."在我开始收到异常“基础连接已关闭:发送时发生意外错误”之后。 I changed my code and defined the protocol security as below-我更改了代码并将协议安全定义如下-

ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072 | ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072 | (SecurityProtocolType)768; (SecurityProtocolType)768; | | SecurityProtocolType.Ssl3 | SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls; SecurityProtocolType.Tls;

After changing my code at my local environment started working but still have issue at Live server.在我的本地环境中更改我的代码后开始工作,但在 Live 服务器上仍然存在问题。

"The requested security protocol is not supported." “不支持请求的安全协议。”

I have already defined the possible security protocol but still the same code is not working for Live.我已经定义了可能的安全协议,但相同的代码仍然不适用于 Live。

Also, due to limitations of the version we are using, we cannot upgrade the Framework at this time.另外,由于我们使用的版本的限制,我们目前无法升级框架。

Please suggest.请建议。

As per my research and referring the many blog ,I am find the .NET 3.5 or below.根据我的研究并参考了许多博客,我找到了 .NET 3.5 或更低版本。 TLS 1.2 is not supported (*) and there is no workaround.不支持 TLS 1.2 (*) 并且没有解决方法。 Upgrade your application to more recent version of the framework.将您的应用程序升级到框架的更新版本。

Refer link : https://blogs.perficient.com/2016/04/28/tsl-1-2-and-net-support/参考链接: https : //blogs.perficient.com/2016/04/28/tsl-1-2-and-net-support/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM