Permalink
Browse files

Windows8 fixes

  • Loading branch information...
Redth committed Sep 19, 2012
1 parent 02a790d commit 543da2982667a70dfeaa9ef745b490756809e765
Showing with 10 additions and 1 deletion.
  1. +10 −1 PushSharp.Windows/WindowsPushChannel.cs
@@ -59,6 +59,15 @@ void RenewAccessToken()
}
protected override void SendNotification(Common.Notification notification)
+ {
+ try { sendNotification(notification); }
+ catch (Exception ex)
+ {
+ this.Events.RaiseChannelException(ex, PlatformType.Windows, notification);
+ }
+ }
+
+ void sendNotification(Common.Notification notification)
{
//See if we need an access token
if (string.IsNullOrEmpty(AccessToken))
@@ -87,7 +96,7 @@ protected override void SendNotification(Common.Notification notification)
break;
}
- var request = (HttpWebRequest)HttpWebRequest.Create("https://cloud.notify.windows.com");
+ var request = (HttpWebRequest)HttpWebRequest.Create(winNotification.ChannelUri); // "https://notify.windows.com");
request.Method = "POST";
request.Headers.Add("X-WNS-Type", wnsType);
request.Headers.Add("Authorization", string.Format("Bearer {0}", this.AccessToken));

0 comments on commit 543da29

Please sign in to comment.