PushBroker push = new PushBroker();
var appleCert = File.ReadAllBytes(@"D:\Mvc\pushNotification\pushNotification\Key\file.p12");
push.OnNotificationSent += NotificationSent;
push.OnChannelException += ChannelException;
push.OnServiceException += ServiceException;
push.OnNotificationFailed += NotificationFailed;
push.OnDeviceSubscriptionExpired += DeviceSubscriptionExpired;
push.OnDeviceSubscriptionChanged += DeviceSubscriptionChanged;
push.OnChannelCreated += ChannelCreated;
push.OnChannelDestroyed += ChannelDestroyed;
push.RegisterAppleService(new PushSharp.Apple.ApplePushChannelSettings(false, appleCert, "password"));
PushSharp.Apple.AppleNotification notif = new PushSharp.Apple.AppleNotification()
.ForDeviceToken("deviceToken")
.WithAlert("Message")
.WithBadge(1)
.WithSound("default");
push.QueueNotification(notif);
push.StopAllServices(waitForQueuesToFinish: true);
I did changes settings in IIS DefaultAppPool> Advanced settings >identity is changed to LocalSystem. still its not working.
http://blog.mdisoft.com/post/10736697438/apple-push-notifications-apns-with-net-c-and
Please do somebody help regarding the same
Thank You
After R&D I got solution to this
I used following project to run IOS pushnotification
sometimes it wont work in IIS6 but its working correctly in IIS7.5
https://github.com/Redth/APNS-Sharp/tree/master/JdSoft.Apple.Apns.Notifications