C# 使用push sharp库的iOS推送通知问题
我在为iOS设备发送推送通知时收到以下错误。这几天一直运行良好,但突然停止工作。我尝试在本地计算机上安装证书,但没有成功。我使用的是pushsharp的2.2.1版本。我曾尝试用谷歌搜索这个错误,但没有一个解决方案对我有效。有人能帮忙吗 使用的代码:C# 使用push sharp库的iOS推送通知问题,c#,ios,.net,apple-push-notifications,C#,Ios,.net,Apple Push Notifications,我在为iOS设备发送推送通知时收到以下错误。这几天一直运行良好,但突然停止工作。我尝试在本地计算机上安装证书,但没有成功。我使用的是pushsharp的2.2.1版本。我曾尝试用谷歌搜索这个错误,但没有一个解决方案对我有效。有人能帮忙吗 使用的代码: string cert = appSettings.Where(x => x.Key == "APNS_CUSTOMER_CERT").Select(x => x.Value).FirstOrDefault(); var appleC
string cert = appSettings.Where(x => x.Key == "APNS_CUSTOMER_CERT").Select(x => x.Value).FirstOrDefault();
var appleCert = System.Web.Hosting.HostingEnvironment.MapPath("~/Certificate") + "\\" + cert;
push.RegisterAppleService(new ApplePushChannelSettings(true, appleCert, "", true));
AppleNotificationAlert alert = new AppleNotificationAlert();
alert.Body = TickerText;
AppleNotificationPayload p = new AppleNotificationPayload();
p.AddCustom("Msg", BodyText);
p.Badge = 1;
p.Alert = alert;
foreach (var s in additionalData)
{
p.AddCustom(s.Key, s.Value);
}
push.QueueNotification(new AppleNotification()
.ForDeviceToken(DeviceToken)//the recipient device id
.WithPayload(p)
);
频道异常:PushSharp.Apple.ApplePushService->System.Security.Authentication.AuthenticationException:对SSPI的调用
失败,请参阅内部异常。-->
System.ComponentModel.Win32Exception:运行时发生未知错误
正在处理证书--内部异常堆栈跟踪的结束
---位于System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken
消息,AsyncProtocolRequest,asyncRequest,异常)位于
System.Net.Security.SslState.ProcessReceivedBlob(字节[]缓冲区,Int32
计数,异步协议请求(异步请求)
System.Net.Security.SslState.StartReceiveBlob(字节[]缓冲区,
AsyncProtocolRequest(异步请求)位于
System.Net.Security.SslState.ProcessReceivedBlob(字节[]缓冲区,Int32
计数,异步协议请求(异步请求)
System.Net.Security.SslState.StartReceiveBlob(字节[]缓冲区,
AsyncProtocolRequest(异步请求)位于
System.Net.Security.SslState.ProcessReceivedBlob(字节[]缓冲区,Int32
计数,异步协议请求(异步请求)
System.Net.Security.SslState.StartReceiveBlob(字节[]缓冲区,
AsyncProtocolRequest(异步请求)位于
System.Net.Security.SslState.ProcessReceivedBlob(字节[]缓冲区,Int32
计数,异步协议请求(异步请求)
System.Net.Security.SslState.StartReceiveBlob(字节[]缓冲区,
AsyncProtocolRequest(异步请求)位于
System.Net.Security.SslState.ProcessReceivedBlob(字节[]缓冲区,Int32
计数,异步协议请求(异步请求)
System.Net.Security.SslState.StartReceiveBlob(字节[]缓冲区,
AsyncProtocolRequest(异步请求)位于
System.Net.Security.SslState.ForceAuthentication(布尔值receiveFirst,
字节[]缓冲区,异步协议请求(异步请求)
System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult
懒散的(结果)
PushSharp.Apple.FeedbackService.Run(ApplePushChannelSettings,
CancellationToken(取消令牌)位于
PushSharp.Apple.ApplePushService.c\u anostorey0.m\u 1(对象
(州)
2016-07-27 19:28:14681[136]信息网络API-失败:
PushSharp.Apple.ApplePushService->最大发送次数
已尝试发送通知
我们遇到了同样的问题,您是否找到了解决方案?在我们的实现中也遇到了同样的问题,如果您找到了解决方法,请与我们分享。