Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone certificate error in apns sharp A call to SSPI failed
    primarykey
    data
    text
    <p>i have a data service hosted in azure from which i am sending notification to iphone but while establishing connection with apns i am getting following error "A call to SSPI failed. The message received was unexpected or badly formatted." i also refered following links for the same error but still getting the error</p> <p><a href="https://stackoverflow.com/questions/3162076/apple-push-notification-with-apns-sharp/3221612#3221612">apple push notification with APNS sharp</a> and <a href="https://stackoverflow.com/questions/1056083/c-iphone-push-server">C# iPhone push server?</a> </p> <pre><code> try { using (TcpClient client = new TcpClient()) { try { client.Connect("gateway.sandbox.push.apple.com", 2195); Logging("TSSLProDi :Connected to Apple"); } catch (Exception ex) { Logging("TSSLProDi :" + ex.Message + "-IE-" + ex.InnerException); } using (NetworkStream networkStream = client.GetStream()) { Logging("TSSLProDi :Client connected."); X509Certificate clientCertificate = new X509Certificate(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory + @"startup\certname.pfx"), "mycertpassword"); X509CertificateCollection clientCertificateCollection = new X509CertificateCollection(new X509Certificate[1] { clientCertificate }); // Create an SSL stream that will close the client's stream. SslStream sslStream = new SslStream( client.GetStream(), false, new RemoteCertificateValidationCallback(validateServerCertificate), null ); try { sslStream.AuthenticateAsClient("gateway.sandbox.push.apple.com", clientCertificateCollection, System.Security.Authentication.SslProtocols.Default, false); Logging("TSSLProDi :slStreamAuthenticated"); } catch (AuthenticationException ex) { Logging("TSSLProDi :" + "Exception: " + ex.Message.ToString()); if (ex.InnerException != null) { Logging("Inner exception: " + ex.InnerException.Message.ToString()); } Logging("TSSLProDi :" + "Authentication failed - closing the connection."); client.Close(); return; } } } } catch (Exception ex) { Logging("TSSLProCert :" + ex.Message + "-IE-" + ex.InnerException); } </code></pre> <p>i have installed the needed certificates on VM also. <strong>one warning i am getting on iphone developer_identity certificate which i got from apple is that "Windows does not have enough information to verify this certificate"</strong> is there is some thing wrong with my iphone certificate. please help me i am stuck </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload