मेरे पास एज़ूर में होस्ट की गई एक डाटा सेवा है जिसमें से मैं आईफोन में अधिसूचना भेज रहा हूं लेकिन एपीएनएस के साथ कनेक्शन स्थापित करते समय मुझे निम्नलिखित त्रुटि मिल रही है "एसएसपीआई को कॉल विफल रहा। प्राप्त संदेश अप्रत्याशित या बुरी तरह स्वरूपित था। " मैं भी एक ही त्रुटि के लिए लिंक का पालन लेकिन अभी भी त्रुटिएसपीएसआई में आईफोन सर्टिफिकेट त्रुटि तेज एसएसपीआई को कॉल
apple push notification with APNS sharp और C# iPhone push server?
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);
}
मैं भी वी एम पर जरूरत प्रमाण पत्र स्थापित किया है हो रही संदर्भित। एक चेतावनी जो मैं एप्पल से प्राप्त आईफोन डेवलपर_डिडिटी प्रमाणपत्र पर प्राप्त कर रहा हूं वह यह है कि "इस प्रमाणपत्र को सत्यापित करने के लिए विंडोज़ में पर्याप्त जानकारी नहीं है" क्या मेरे आईफोन प्रमाणपत्र में कुछ गड़बड़ है। कृपया मेरी मदद करो मैं अटक कर रहा हूँ
में भी टिप्पणी की लेकिन एक ही त्रुटि की कोशिश की। मैं सही प्रमाण पत्र और पासवर्ड है कुछ भी कोड के साथ गलत है है –