C# 自今天起,AuthenticateWithApp throwns NullReferenceException异常

C# 自今天起,AuthenticateWithApp throwns NullReferenceException异常,c#,.net,podio,C#,.net,Podio,从今天起,在.NET Podio客户端(最新版本1.5.8)中调用AuthenticateWithApp函数时,我们将面临NullReferenceException 我无法在状态网站上看到Podio API的更新或任何停机时间。我想这一定是Podio API内部的问题 有人有同样的问题吗 今天,托尔斯滕也偶然发现了这一点。postman.NET库中的请求失败。这是由Podio的API更新引起的,就像@Sara说的。看来我的系统(还有你的)仍然默认为Tls 1.0 将其添加到Main()的开头。

从今天起,在.NET Podio客户端(最新版本1.5.8)中调用AuthenticateWithApp函数时,我们将面临NullReferenceException

我无法在状态网站上看到Podio API的更新或任何停机时间。我想这一定是Podio API内部的问题

有人有同样的问题吗


今天,托尔斯滕也偶然发现了这一点。postman.NET库中的请求失败。这是由Podio的API更新引起的,就像@Sara说的。看来我的系统(还有你的)仍然默认为Tls 1.0

将其添加到Main()的开头。这将至少强制Tls 1.1

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
或者,您也可以设置默认值,如下所述:


今天,我也偶然发现了这个。postman.NET库中的请求失败。这是由Podio的API更新引起的,就像@Sara说的。看来我的系统(还有你的)仍然默认为Tls 1.0

将其添加到Main()的开头。这将至少强制Tls 1.1

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
或者,您也可以设置默认值,如下所述:


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

ServicePointManager.SecurityProtocol = (SecurityProtocolType)768 | (SecurityProtocolType)3072;
更改在文件第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请求(RequestMethod-RequestMethod,字符串url,动态requestData,动态选项=null)
其中T:new()
{
Dictionary requestHeaders=新建字典();
改为

 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>();
private T请求(RequestMethod-RequestMethod,字符串url,动态requestData,动态选项=null)
其中T:new()
{
ServicePointManager.SecurityProtocol=(SecurityProtocolType)768 |(SecurityProtocolType)3072;
Dictionary requestHeaders=新建字典();
希望这会有帮助



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

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

ServicePointManager.SecurityProtocol = (SecurityProtocolType)768 | (SecurityProtocolType)3072;
更改在文件第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请求(RequestMethod-RequestMethod,字符串url,动态requestData,动态选项=null)
其中T:new()
{
Dictionary requestHeaders=新建字典();
改为

 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>();
private T请求(RequestMethod-RequestMethod,字符串url,动态requestData,动态选项=null)
其中T:new()
{
ServicePointManager.SecurityProtocol=(SecurityProtocolType)768 |(SecurityProtocolType)3072;
Dictionary requestHeaders=新建字典();
希望这会有帮助



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

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

ServicePointManager.SecurityProtocol = (SecurityProtocolType)768 | (SecurityProtocolType)3072;
我在Default.aspx-Page的Page_Load-Method中插入了这一行

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


尊敬Tony

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

ServicePointManager.SecurityProtocol = (SecurityProtocolType)768 | (SecurityProtocolType)3072;
我在Default.aspx-Page的Page_Load-Method中插入了这一行

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


关于Tony

Hi@Amy,我用更多信息更新了我的问题。我想现在更好理解了?!你考虑过联系Podio吗?你的问题不再需要回答了。不,我无法联系Podio,因为他们将所有支持都转移到了stackoverflow。在这里,你可以看到:你会共享该异常的stacktrace吗?请同时验证您的.net配置为使用TLS 1.1或TLS1.2,因为TLS 1.0已被弃用和禁用。嗨@Amy,我用更多信息更新了我的问题。我想现在更好地理解?!您考虑过联系Podio吗?您的问题不再可以回答。不,我无法联系Podio,因为它们将所有支持移动到stackoverflow。这里,您可以看到:您愿意共享该异常的stacktrace吗?还请验证您的.net是否配置为使用TLS 1.1或TLS1.2,因为TLS 1.0已被弃用和禁用。