IOS 的 C# PushSharp 通知在 IIS 7.5 中不起作用

C# PushSharp notification for IOS is not working in IIS 7.5

         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);

我在 IIS DefaultAppPool > Advanced settings > identity 中更改了设置,更改为 LocalSystem。还是不行。

http://blog.mdisoft.com/post/10736697438/apple-push-notifications-apns-with-net-c-and

请有人帮忙解决同样的问题

谢谢

经过研发我得到了解决方案

我使用以下项目来 运行 IOS 推送通知

有时它在 IIS6 中无法工作,但在 IIS7.5 中可以正常工作

https://github.com/Redth/APNS-Sharp/tree/master/JdSoft.Apple.Apns.Notifications