arashnorouzi / Moon-APNS

A free open source c# library for sending Apple Push Notifications in any .net application.
http://arashnorouzi.wordpress.com
90 stars 45 forks source link

problem in push notification with moon- APNS #3

Open sweetshlok opened 12 years ago

sweetshlok commented 12 years ago

when i Try to push notification I am getting following problem.

I got error as : "A call to SSPI failed, see inner exception." in pushnotification.cs page of moon-APNS. method : SendQueueToapple(IEnumerable queue)

error occurs in following line :

_apnsStream.BeginRead(response, 0, 6, ReadResponse, new MyAsyncInfo(response, _apnsStream));

of method : SendQueueToapple(IEnumerable queue)

waiting for the best solution.

thanx in advance.

dtrikannad commented 12 years ago

I'm having the same problem...any luck with a fix?

zheraron commented 12 years ago

must of the cases the issue is the path of the file p12 or the password, try to change the path of the file and verify the password it should work

AbelSoul commented 11 years ago

I had the same error and it was because I hadn't used the correct path to the p12 file.

Editing it got rid of the error but I'm not receiving any notifications on the device, although otherwise the code appears to be working OK.

ntavn commented 10 years ago

Is there any one who still has the issue? I tried few times in certificate.p12 file but cannot get it run. the message error: {"The message received was unexpected or badly formatted"} -2146233087 I moved 2 p12 files to C:\certificate.p12 with password and C:\certificate_nopass.p12 without password tried Development and Production Certificate but it did not work at all. Can any one show me how to solve the issue? Thanks in advance

peaksoft commented 10 years ago

i got this following error while calling apple push notification.

“The message received was unexpected or badly formatted” inner exception : The message received was unexpected or badly formatted

anyone can help me to solve this

Thanks in advance, Jey

capasso commented 10 years ago

I am also getting this error: "The message received was unexpected or badly formatted". My certificates are not expired, and this error has just started to occur.

Any ideas? Thanks.

***Update: This was an issue with Apple changing the connect from SSL to TSL.

AhmedShafiik commented 8 years ago

Finally solved.

change the connect from SSL to TSL. _apnsStream.AuthenticateAsClient(host, certificates, System.Security.Authentication.SslProtocols.Tls, false);

NeelamParmar commented 5 years ago

Is there any other solution ? I did tried by changing sslProtocol to Tls, but it didn't worked for me. I am still facing same issue "A call to SSPI failed, see inner exception." The inner exception is "The function requested is not supported".