AuthenticateWithApp 从今天开始抛出 NullReferenceException

AuthenticateWithApp throwns NullReferenceException since today

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

我在状态网站上看不到 Podio-API 的更新或任何停机时间。估计是跑道内部的问题API.

有人遇到同样的问题吗?

问候托尔斯滕

今天也偶然发现了那个。邮递员工作的 Podio .NET 库中的请求失败。正如@Sara 所说,这是由 Podio 的 API 更新引起的。似乎我的系统(还有你的)仍然默认为 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 library。 Podio Sync库属于Dotnet framework 4.0,所以我们添加了一行代码来设置默认安全协议。

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

更改在 Podio.cs 文件第 76 行

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

改为

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

            Dictionary<string, string> requestHeaders = new Dictionary<string, string>();

希望这会有所帮助..


可以找到 SecurityProtocol 问题的解决方案

我今天可以解决这个问题。 @derpirscher 对协议的提示很有帮助。因为我们使用 .Net 4.0,所以我不得不尝试一下。但后来我想到了这一行:

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

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

现在对 Podio-API 的调用又能正常工作了。感谢您的帮助!

问候托尼