本文介绍了PushSharp ApplePushService 给出通道异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我能够成功地为 ios 设备发送和接收推送通知,但是现在我看到了这个错误:它似乎在连接后出现,但达到了最大尝试次数,然后它会尝试再次连接并出现此错误:我在看到这些错误之前和之后使用了相同的凭据,它成功发送了通知,并且我在我的设备上收到了它们.它似乎尝试连接,然后达到最大尝试次数,然后再次尝试连接并出现此错误.如果凭据工作一次,它不应该一直工作吗?I was able to send and receive push notification sucessfully for ios device, however now I am seeig this error: It appears after it seems to connect but the maximum attempts are reached then it triesto connect again and gives this error: I have used the same credentials before and after seeing these errors it successfully sends the notifications and I get them on my device. It seems to try to connect and then it reaches the maximum attempts and then it tries to connect again and gives this error. If the credentials work once shouldn't it work all the time?AMMethod:ServiceException;通道异常:PushSharp.Apple.ApplePushService ->System.ComponentModel.Win32Exception (0x80004005):凭据提供给包裹在System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterfaceSecModule、String 包、CredentialUse 意图、SecureCredential scc)在System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUsecredUsage、SecureCredential&安全凭证)在System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]&拇指印)在System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32偏移量,Int32 计数,Byte[]&输出)在System.Net.Security.SslState.StartSendBlob(Byte[] 传入, Int32计数,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32计数,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.StartReceiveBlob(Byte[] 缓冲区,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.StartSendBlob(Byte[] 传入, Int32计数,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32计数,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.StartReceiveBlob(Byte[] 缓冲区,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.StartSendBlob(Byte[] 传入, Int32计数,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32计数,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.StartReceiveBlob(Byte[] 缓冲区,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.StartSendBlob(Byte[] 传入, Int32计数,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst,Byte[] 缓冲区,AsyncProtocolRequest asyncRequest) 在System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult懒惰结果)在PushSharp.Apple.FeedbackService.Run(ApplePushChannelSettings 设置,CancellationToken cancelToken) 在PushSharp.Apple.ApplePushService.c_DisplayClass4.b_1(Object状态) AMMethod:ServiceException; Channel Exception: PushSharp.Apple.ApplePushService -> System.ComponentModel.Win32Exception (0x80004005): The credentials supplied to the package were not recognized at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc) at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential) at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint) at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at PushSharp.Apple.FeedbackService.Run(ApplePushChannelSettings settings, CancellationToken cancelToken) at PushSharp.Apple.ApplePushService.<>c_DisplayClass4.<.ctor>b_1(Object state)推荐答案我通过重新生成证书解决了这个问题.我将新的 .cer 安装到服务器上并将其导出为 .p12 以与 pushsharp 代码一起使用.I resolved this issue by regenerating the certificate.I installed the new .cer onto the server and exported it into a .p12 to use with the pushsharp code. 这篇关于PushSharp ApplePushService 给出通道异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-23 14:14