简体   繁体   English

Braintree 中的“请求被中止:无法创建 SSL/TLS 安全通道”错误

[英]"The request was aborted: Could not create SSL/TLS secure channel" error in Braintree

In my local PC Braintree showing error "The request was aborted: Could not create SSL/TLS secure channel" when executing:在我的本地 PC Braintree 执行时显示错误“请求已中止:无法创建 SSL/TLS 安全通道”:

 var clientToken = gateway.ClientToken.generate();

I am using "Braintree-2.33.0.dll" and my target .net version is 4.5.1.我正在使用“Braintree-2.33.0.dll”,我的目标 .net 版本是 4.5.1。 I have enabled TLS 1.2.我已启用 TLS 1.2。

It was working nicely three days ago.三天前它工作得很好。 But suddenly started showing error.但是突然开始显示错误。 Many people faced same error and most of then have changed the SecurityProtocol .许多人面临同样的错误,大多数人都改变了SecurityProtocol I dont find any way to change that from braintree.我没有找到任何方法来改变 Braintree。 Is there any way to change有什么办法可以改变

ServicePointManager.SecurityProtocol ServicePointManager.SecurityProtocol

for braintree?对于大脑树? or anything else I am missing or need to do?还是我缺少或需要做的其他事情? Thanks in advance.提前致谢。

Full disclosure: I work at Braintree. 完全披露:我在Braintree工作。 If you have any further questions, feel free to contact support . 如果您有任何其他问题,请随时联系支持

You need to update the .NET Braintree SDK you're using to at least version 3.1.0 , the minimum version that supports TLS 1.2. 您需要将您正在使用的.NET Braintree SDK更新到至少3.1.0版本,这是支持TLS 1.2的最低版本。 Once compelete, you can validate your setup using the steps here . 一旦完成,您可以使用此处的步骤验证您的设置。

On December 13, 2016 , Braintree transitioned sandbox to only accept requests made using TLS 1.2+. 2016年12月13日 ,Braintree将沙箱转换为仅接受使用TLS 1.2+发出的请求。 After June 30th, 2017, Braintree will no longer officially support any requests in the production environment below TLS 1.2. 2017年6月30日之后,Braintree将不再正式支持TLS 1.2以下生产环境中的任何请求。

Setting this anywhere in your program.cs or startup.cs worked for me, even on versions greater than 3.1:在您的program.csstartup.cs中的任何位置设置它对我有用,即使在高于 3.1 的版本上:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

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

相关问题 WebException:请求已中止:无法创建SSL / TLS安全通道 - WebException: The request was aborted: Could not create SSL/TLS secure channel HttpWebRequest:请求已中止:无法创建SSL / TLS安全通道 - HttpWebRequest: The request was aborted: Could not create SSL/TLS secure channel 请求被中止:无法创建 SSL/TLS 安全通道 - The request was aborted: Could not create SSL/TLS secure channel 请求已中止:无法创建 SSL/TLS 安全通道 - The request was aborted: Could not create SSL/TLS secure channel RestSharp 请求中止 - 无法创建 SSL/TLS 安全通道 - RestSharp request aborted - could not create SSL/TLS secure channel 请求已中止:无法创建SSL / TLS安全通道 - request was aborted: Could not create SSL/TLS secure channel 该请求已中止:无法为HttpWebRequest创建SSL / TLS安全通道 - The request was aborted: Could not create SSL/TLS secure channel for HttpWebRequest IIS 2019:请求被中止:无法创建 SSL/TLS 安全通道 - IIS 2019: The request was aborted: Could not create SSL/TLS secure channel ASP.NET - 请求已中止:无法创建SSL / TLS安全通道 - ASP.NET - The request was aborted: Could not create SSL/TLS secure channel Paypal IPN问题-请求已中止:无法创建SSL / TLS安全通道 - Paypal IPN issue - The request was aborted: Could not create SSL/TLS secure channel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM