A call to SSPI failed, see inner exception

10k views Asked by At
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.

4

There are 4 answers

0
Stornu2 On

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

0
JCLopez On

Change:

System.Security.Authentication.SslProtocols.Ssl3

to:

System.Security.Authentication.SslProtocols.Tls 
0
Digvijay Machale On

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

0
iShwar On

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.