nagender
nagender

Reputation: 46

A call to SSPI failed, see inner exception

try
{
    _apnsStream.AuthenticateAsClient("gateway.sandbox.push.apple.com", certificates, System.Security.Authentication.SslProtocols.Ssl3, false);
}

I am getting this error "A call to SSPI failed, see inner exception" at the above line while using Moon-Apns dll in my .net web service... can any one suggest me to solve this issue.

Upvotes: 3

Views: 10356

Answers (4)

iShwar
iShwar

Reputation: 1665

I faced same issue currently, The reason was whatever .p12 given/assigned in ASP.net script in back end that .p12 file's corresponding certificate of push notification in keychain was expired, i simply created new developer certificate in and new developer provisioning profile then exported the .p12 file on newly created developer certificate and given to back end developer he assigned that new .p12 in his script, i assigned the newly created provisioning profile in my xcode. and it worked.

Upvotes: 0

Digvijay Machale
Digvijay Machale

Reputation: 599

use production certificate and not development certificate.

use gateway.push.apple.com instead of gateway.sandbox.push.apple.com

AND System.Security.Authentication.SslProtocols.Ssl3 to System.Security.Authentication.SslProtocols.Tls

Upvotes: 1

JCLopez
JCLopez

Reputation: 121

Change:

System.Security.Authentication.SslProtocols.Ssl3

to:

System.Security.Authentication.SslProtocols.Tls 

Upvotes: 2

Stornu2
Stornu2

Reputation: 2332

I do not know if this will be helpful after a year, but I leave the answer for iOS8.

Apple has changed the server security and right on the line you mention, you have to change from SSL to TLS:

Original code:

_apnsStream.AuthenticateAsClient(host,certificates,System.Security.Authentication.SslProtocols.Ssl3, false); 

New code:

_apnsStream.AuthenticateAsClient(host,certificates,System.Security.Authentication.SslProtocols.Tls, false);

I hope this information is helpful to someone.

Someone commented this in the GIT forum

Upvotes: 0

Related Questions