1

I'm using PushSharp to handle push notifications as part of a C#/ASP.NET back end for a Cordova app.

The push notifications are sent and received successfully for the Android and iOS platforms, but fail to send for the Windows platform.

When attempting to send a notification to a Windows device, the OnNotificationFailed function for the WnsServiceBroker is hit with the following WnsNotificationException:

+       Data    {System.Collections.ListDictionaryInternal} System.Collections.IDictionary     {System.Collections.ListDictionaryInternal}
        HResult -2146233088 int
        HelpLink    null    string
+       IPForWatsonBuckets  {201287680} System.UIntPtr
+       InnerException  null    System.Exception
        IsTransient false   bool
        Message ""  string
+       Notification (PushSharp.Core.NotificationException) {PushSharp.Windows.WnsToastNotification}        PushSharp.Core.INotification {PushSharp.Windows.WnsToastNotification}
+       Notification    {PushSharp.Windows.WnsToastNotification}    PushSharp.Windows.WnsNotification     {PushSharp.Windows.WnsToastNotification}
        RemoteStackTrace    null    string
        Source  "PushSharp.Windows" string
        StackTrace  "   at PushSharp.Windows.WnsServiceConnection.<Send>d__9.MoveNext()"    string
-       Status  {PushSharp.Windows.WnsNotificationStatus}   PushSharp.Windows.WnsNotificationStatus
        DebugTrace  "DB5SCH101121703"   string
        DeviceConnectionStatus  Connected   PushSharp.Windows.WnsDeviceConnectionStatus
        ErrorDescription    ""  string
        HttpStatus  OK  System.Net.HttpStatusCode
        MessageId   "BDC50A927012145"   string
+       Notification    {PushSharp.Windows.WnsToastNotification}    PushSharp.Windows.WnsNotification     {PushSharp.Windows.WnsToastNotification}
        NotificationStatus  ChannelThrottled    PushSharp.Windows.WnsNotificationSendStatus
+       TargetSite  {Void MoveNext()}   System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}

I'm confident my Windows App credentials are correct and the code is largely the same as the example on the PushSharp github page.

I've found people with the exact same issue: https://github.com/Redth/PushSharp/issues/720 https://stackoverflow360.com/questions/37838015/wns-notification-error-pushsharp

Anyone know how to fix this? Let me know if anymore information is required.

Thanks

whataguy
  • 11
  • 1

0 Answers0