Hello everyone, I am using apple certificate for push notification and its working fine on localhost but i am geting Cryptographic Exception: An internal error occoured error message when i set the stratup URL of my project.
[from comment]
I am getting error when i am doing this :
NotificationService service = new NotificationService(sandbox, p12Filename, p12FilePassword, 1);
Below is the stack trace :
at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)
at System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromBlob(Byte[] rawData, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx)
at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromBlob(Byte[] rawData, Object password, X509KeyStorageFlags keyStorageFlags)
at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData, String password)
at Apple.Apns.Notifications.NotificationConnection.start(String p12File, String p12FilePassword)
at Apple.Apns.Notifications.NotificationConnection..ctor(String host, Int32 port, String p12File, String p12FilePassword)
at Apple.Apns.Notifications.NotificationService.set_Connections(Int32 value)
at Apple.Apns.Notifications.NotificationService..ctor(Boolean sandbox, String p12File, String p12FilePassword, Int32 connections)
at Main.SendNotification(String message, String testDeviceToken) in d:\test\PushNotification\App_Code\Manager.cs:line 131
prot0col said:
I've started getting push notification from localhost :) but its not working from IIS 7.
Any suggetions, what could be the reseon ??