【发布时间】:2010-01-19 15:47:38
【问题描述】:
我在使用 Apple 推送通知提供程序 (apns-sharp) 时收到以下异常。
推送通知在我的开发机器上工作,但在 Rackspace 云托管中不起作用。我有与我的开发人员一起运行的确切 Rackspace Cloud 自定义中等信任配置。机器,所以中等信任在这里不是问题。此外,证书文件也不是问题,因为它适用于我的开发人员。机器。
有什么想法吗?
更新 #1:这是否与 Entrust 根服务器有关,可能位于 Rackspace 云服务器上?我检查了 apns-sharp 代码,它似乎忽略了证书验证,但我不是 100% 确定。
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.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count)
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.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, 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.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, 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.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, 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 System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
at JdSoft.Apple.Apns.Notifications.NotificationConnection.OpenSslStream()
at JdSoft.Apple.Apns.Notifications.NotificationConnection.Reconnect()
at JdSoft.Apple.Apns.Notifications.NotificationConnection.workerMethod()
【问题讨论】:
-
您是否曾尝试在 web.config 中使用模拟以希望 X509KeyStorageFlags.MachineKeySet 正常工作?我遇到了和你一样的情况,我现在正在尝试与 Rackspace 合作解决它。我还尝试将 .p12 的路径以及原始字节传递给新的 X509Certificate2 但也没有运气。
-
不,我相信 Rackspace 由于中等信任设置而无法解决问题。我将设计更改为使用 PHP 访问 APNS。
标签: c# iphone apple-push-notifications sslstream