Followed the "Get started with Notification Hubs" walk through line by line and verified that I've done everything correctly. From what I can see. But, I get no notification message in to Windows Store app.
The code runs, no errors. I can see the registration appears on the NH dashboard as the charts show the operation.
But nothing happens.
How do I troubleshoot this?
//register yourself with WNS and tell it you are ready to receive Push Notifications
var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
//connect to service bus
var cn = ConnectionString.CreateUsingSharedAccessKey(new Uri("sb://<namespace>.servicebus.windows.net"),
"<sharedaccesskeyname>", "<sharedaccesskey>");
//connect to Notification Hub
NotificationHub hub = new NotificationHub("<hub name>", cn);
//Send the channel.Uri from WNS to Notification Hubs
await hub.RegisterNativeAsync(channel.Uri);
and then the back-end code is a simple Console app that does this;
var client = NotificationHubClient.CreateClientFromConnectionString(
"Endpoint=sb://<namespace>.servicebus.windows.net/;SharedAccessKeyName=<sharedkeyname>;SharedAccessKey=<sharedaccesskey>",
"<hub name>");
//send a message through NH
await client.SendWindowsNativeNotificationAsync(String.Format("<toast><visual><binding template=\"ToastText01\"><text id=\"1\">{0}</text></binding></visual></toast>",
"Hello!"));