截至今天,SSL API请求失败:“无法创建SSL / TLS安全通道”(SSL API request fails as of today: “Could not create SSL/TLS secure channel”)
我们有一个C#.NET 4.5桌面应用程序,它在半年前发布并运行良好,直到今天。 在启动时,应用程序向我们的Web API发送JSON请求但它失败了
{"The request was aborted: Could not create SSL/TLS secure channel."}
我找到了一些其他解决方案的主题:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
它适用于我们的应用程序,但最大的问题仍然是:为什么它在数千台计算机上工作了半年?
我想到的第一件事是:夏令时,今天发生的时间变化。 所以我检查了服务器时间,更新了SSL证书并重新启动了服务器,但问题仍然存在。
有任何想法吗?
应用程序:.NET 4.5
服务器:Ubuntu 16.04.2 LTS nginx / 1.11.10
更新禁用域的Cloudflare后,问题就消失了。 我不知道究竟是什么导致了这一点,但我怀疑它实际上是...... 与DST时区和SSL握手有关。
we have a C# .NET 4.5 desktop application which was released half a year ago and ran fine until today. On start-up the app sends a JSON request to our Web API but it fails with
{"The request was aborted: Could not create SSL/TLS secure channel."}
I have found some other topics where the solution was this:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
It works for our app as well but the big question remains: Why did it work on thousands of computers for half a year?
The first thing I thought of was: Daylight Savings Time, the time change happened today. So I've checked the server time, renewed the SSL certificate and rebooted the server but the problem remains.
Any ideas?
App: .NET 4.5
Server: Ubuntu 16.04.2 LTS nginx/1.11.10
Update After disabling Cloudflare for the domain, the issue is gone. I don't know what exactly causes this but I suspect that it has in fact sth. to do with DST time zone and SSL handshake.
原文:https://stackoverflow.com/questions/47005547
最满意答案
import time dfs = [] num = len(urls) for i, url in enumerate(urls): dfs.append(pd.read_csv(url)) print 'Process {}, {} left'.format(i+1, num-i-1) time.sleep(2)
import time dfs = [] num = len(urls) for i, url in enumerate(urls): dfs.append(pd.read_csv(url)) print 'Process {}, {} left'.format(i+1, num-i-1) time.sleep(2)
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
在for-in循环中输入模型(Type casting in for-in loop)[2023-11-26]
对于Swift 2及更高版本: Swift 2将案例模式添加到for循环,这使得在for循环中键入cast变得更加简单和安全: for case let button as AClass in view.subviews { // do something with button } 为什么这比Swift 1.2和更早版本能做得更好? 因为案例模式允许您从集合中选择您的特定类型。 它只匹配您要查找的类型,因此如果您的数组包含混合,则只能使用特定类型。 例如: let array: [Any] = ... -
使用var ,它减少变量的范围,否则变量查找最近的闭包搜索var语句。 如果找不到一个var那么它是全局的(如果你处于严格模式, using strict全局变量会抛出一个错误)。 这可能会导致以下问题。 function f (){ for (i=0; i<5; i++); } var i = 2; f (); alert (i); //i == 5. i should be 2 如果在for循环中写入var i ,则警报显示2 。 JavaScript范围和提升 Use var, it red ...
-
import time dfs = [] num = len(urls) for i, url in enumerate(urls): dfs.append(pd.read_csv(url)) print 'Process {}, {} left'.format(i+1, num-i-1) time.sleep(2) import time dfs = [] num = len(urls) for i, url in enumerate(urls): dfs.append(pd.rea ...
-
简单的while循环会做 var index = 0 while (index < 100) { if someCondition(index) { index += 3 //Skip 3 iterations here } else { index += 1 // anything here will not run if someCondition(index) is true } } Simple while loop wil ...
-
你做了什么调试? self.arrayOfSliders是一个尚未发布的有效对象吗? 检查指针是否返回是不够的。 尝试打开NSZombie以查看对象是否已被释放。 What debugging have you done? Is self.arrayOfSliders a valid object that hasn't been released? Checking that a pointer is returned isn't enough. Try turning on NSZombie to se ...
-
使用for-in循环枚举(Enumerating with a for-in loop)[2023-09-14]
while summaryValues [dayIndex] == nil {//错误 summaryValues是一个数组,数组[i]不会返回nil。 它会返回元素,否则将会在您的索引超出范围时崩溃。 首先,比较Int和nil可能会让编译器感到困惑。 其次,尝试访问summaryValues[dayIndex]会崩溃,因为当你检查它时,数组是空的并且索引不存在。 while summaryValues[dayIndex]==nil{ // ERROR summaryValues is an array a ... -
埃文是对的。 但是,当在javascript中使用for..in语句时,最好测试当前属性是对象的属性而不是从原型链继承的东西: for(var attr in obj){ if(obj.hasOwnProperty(attr)){ // first will not appear here } } Evan is correct. However, when using for..in statements in javascript, it is always best to ...
-
swift中for-in循环中where子句的语义是什么?(What are the semantics of a where clause in for-in loop in swift?)[2022-05-30]
以下是两个如何使用它的简单示例。 让我们假设您有两个不同的结构Person和Address声明如下: struct Address { let country: String? } struct Person { let name: String let address: Address? } let people = [ Person(name: "Jack", address: nil), Person(name: "John", address: Addres ...