TLS1.2错误。基础连接已关闭:发送时发生意外错误。Sharepoint上下文。执行查询()c#

TLS1.2错误。基础连接已关闭:发送时发生意外错误。Sharepoint上下文。执行查询()c#,c#,.net,sharepoint,tls1.2,C#,.net,Sharepoint,Tls1.2,我收到错误“基础连接已关闭:发送时发生意外错误” 尝试使用caml查询sharepoint online获取列表项时 在网上搜索很少有关于.NETFramework版本和Tls1.2更新的帖子 以下步骤,例如将.Net Framework增加到4.7,并在静态主函数中添加以下代码 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; 不起作用。仍然面临同样的问题 原因可能是什么?如何解决

我收到错误“基础连接已关闭:发送时发生意外错误” 尝试使用caml查询sharepoint online获取列表项时

在网上搜索很少有关于.NETFramework版本和Tls1.2更新的帖子

以下步骤,例如将.Net Framework增加到4.7,并在静态主函数中添加以下代码

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
不起作用。仍然面临同样的问题

原因可能是什么?如何解决