views:

559

answers:

3

I receive the following exception when using the Apple Push Notification Provider (apns-sharp).

The push notifications work on my development machine however it will not work within the Rackspace Cloud hosting. I have the exact Rackspace Cloud custom medium trust configuration running with my dev. machine so the medium trust can't be the issue here. Also, the certificate file can't be the issue as it works on my dev. machine.

Any ideas?

Update #1: Would this have something to do with the Entrust root server that may not be on the Rackspace Cloud servers? I checked into the apns-sharp code and it looks like it ignores the certificate verification but I'm not 100% sure.

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()
+1  A: 

Does this help?

dtb
I will give that a try and report back. Wouldn't the issue occur on both the dev. machine and production cloud if this was the cause?
Luke
I just finished testing this (only selecting the certificate and not selecting both) and it didn't resolve the issue on the production server.
Luke
it solved the issue for me, thanks a lot!
Tomen
A: 

Did you follow this page: http://code.google.com/p/apns-sharp/wiki/HowToCreatePKCS12Certificate

Also, you may be interested in checking out the latest version of apns-sharp. It has many issues resolved.

Redth
A: 

That answer worked for me, thanks