微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

通过 c# corepush nuget 包生成的 IOS 通知适用于本地 window10 但不适用于 windows server 2012

如何解决通过 c# corepush nuget 包生成的 IOS 通知适用于本地 window10 但不适用于 windows server 2012

我正在使用 c# corepush nuget 包通过 p8 证书发送 IOS 推送通知

它在我的本地机器上运行,它是 windows 10。相同的代码在 windows server 2012 上不起作用。

我从服务器收到此错误

The SSL connection Could not be established,see inner exception.

而内部异常是

Authentication Failed because the remote party has closed the transport stream.

我有下面的代码

System.Net.ServicePointManager.ServerCertificateValidationCallback += (sender,certificate,chain,errors) =>
{
    return true;
};

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

不知道还缺少什么以及如何解决

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。