Shivani Pahuja
Shivani Pahuja

Reputation: 101

Windows Push notification via pushsharp fails after app reinstall - Device Subscription Expired

PushSharp version : Version 2.2.1 Issue Description

Sample Code

push.RegisterWindowsService(new WindowsPushChannelSettings("package name", "package security identifier", "client secret")); push.QueueNotification(new WindowsToastNotification() .AsToastText01("This is a test notification") .ForChannelUri("https://db5.notify.windows.com/?token=AwYAAADhaxGQuJHxAGCdCOJa+kyrZ012wjF19Zm+VfriKZVxKqM3Dt4kQz9t6EllMZHgiA4oE1uvij2wdiTwItmp7UUnGoAPp3hc9FnLkJqpckt1xQAux/wez++MVGaty0QKRNk="));

Exception

"Device Subscription Expired: PushSharp.Windows.WindowsPushService -> new channel URI" enter image description here

Upvotes: 2

Views: 234

Answers (1)

Shivani Pahuja
Shivani Pahuja

Reputation: 101

Resolved the issue. The device token was getting url decoded while transmitting from angular UI to pushsharp app. Encoding again helped to gain the actual channel URI.

System.Web.HttpUtility.UrlEncode(DeviceToken);

Upvotes: 1

Related Questions