Closed rkbsoftsolutions closed 1 year ago
Describe the bug A clear and concise description of what the bug is.
Code snippet string certificatePath = HttpContext.Current.Server.MapPath("~/Certificates/23456789.p12"); X509Certificate2 cert = new X509Certificate2(System.IO.File.ReadAllBytes(certificatePath), "123456789", X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable); var apns = ApnsClient.CreateUsingCustomHttpClient(new HttpClient(new WinHttpHandler()), cert); var push = new ApplePush(ApplePushType.Alert) .AddAlert("pn", "pn", text).AddToken(deviceToken);
try { var response = await apns.SendAsync(push);
Expected behavior Call should be success.
Actual behavior getting "MissingProviderToken" issue
Environment dotAPNS version: (i.e. 4.0.1)
Additional context Add any other context about the problem here.
I found the issue. As mentioned on documentation. Certificate validate not working with .Net framework. So I will have to upgrade the application and shifted to .Net core. 3.1 or above then I was working.
Describe the bug A clear and concise description of what the bug is.
Code snippet string certificatePath = HttpContext.Current.Server.MapPath("~/Certificates/23456789.p12"); X509Certificate2 cert = new X509Certificate2(System.IO.File.ReadAllBytes(certificatePath), "123456789", X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable); var apns = ApnsClient.CreateUsingCustomHttpClient(new HttpClient(new WinHttpHandler()), cert); var push = new ApplePush(ApplePushType.Alert) .AddAlert("pn", "pn", text).AddToken(deviceToken);
Expected behavior Call should be success.
Actual behavior getting "MissingProviderToken" issue
Environment dotAPNS version: (i.e. 4.0.1)
Additional context Add any other context about the problem here.