从今天开始,AuthenticateWithApp会抛出NullReferenceException

从今天开始,我们在.NET-Podio-Client(最新版本1.5.8)中调用AuthenticateWithApp函数时面临NullReferenceException。

我无法在状态网站上看到Podio-API的更新或任何停机时间。 我想这绝对是Podio API中的一个问题。

有同样问题的人吗?

关心Thorsten

今天偶然发现了那个。 邮递员Podio .NET库中的请求失败。 这是由Podio的API更新引起的,就像@Sara所说的那样。 似乎我的系统(以及你的系统)仍默认为Tls 1.0

在Main()的开头添加它。 这将至少迫使Tls 1.1。

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11; 

或者您也可以设置默认值,如下所述:

https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls

我们有同样的问题,我们通过修改库修复了这个问题。 我们的大部分项目都使用Podio Sync库 。 Podio Sync库属于Dotnet framework 4.0,因此我们添加了一行代码来设置默认安全协议。

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

更改在Podio.cs文件行76中完成

 private T Request(RequestMethod requestMethod, string url, dynamic requestData, dynamic options = null) where T : new() { Dictionary requestHeaders = new Dictionary(); 

变成

  private T Request(RequestMethod requestMethod, string url, dynamic requestData, dynamic options = null) where T : new() { ServicePointManager.SecurityProtocol = (SecurityProtocolType)768 | (SecurityProtocolType)3072; Dictionary requestHeaders = new Dictionary(); 

希望这会有所帮助..


可以找到SecurityProtocol问题的解决方案C#HttpWebRequest底层连接已关闭:发送时发生意外错误

我今天可以解决这个问题。 来自@derpirscher的协议提示很有帮助。 因为我们使用.Net 4.0,所以我不得不玩一点。 但后来我提出了这条线:

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

我在Default.aspx-Page的Page_Load-Method中插入了这一行。

现在,对Podio-API的调用再次正常工作。 感谢帮助!

关心托尼