I'm using toast notifications for my phone app. When the app is first started on someones phone it will get the push notification URL and then store it in our database so we can send notifications down to the user.
In testing, using both the emulator and testing on my HTC WP7 the notification was found and uploaded.
Now the application is in the store, notification URL's are coming to the server as NULL. In the app dashboard I'm getting the following:
Missing certificate for authenticated push notifications: Certificate for authenticated push notifications
Would this be causing the issue? If so, how do I go about getting this certificate? I can't find anything relating to this anywhere.
Below is a code snippet, which worked in testing but since publishing to the store is always returning NULL:
private void BindChannel()
{
channel = HttpNotificationChannel.Find(channelName);
if (channel == null || channel.ChannelUri == null)
{
if (channel != null) DisposeChannel();
channel = new HttpNotificationChannel(channelName);
channel.ChannelUriUpdated += channel_ChannelUriUpdated;
channel.Open();
}
else
{
StorageSettings.StoreSetting("NotifyURL", channel.ChannelUri.AbsoluteUri);
}
SubscribeToChannelEvents();
if (!channel.IsShellTileBound) channel.BindToShellTile();
if (!channel.IsShellToastBound) channel.BindToShellToast();
string notificationUri = string.Empty;
if (StorageSettings.TryGetSetting<string>("NotifyURL", out notificationUri))
{
if (notificationUri != channel.ChannelUri.AbsoluteUri)
{
StorageSettings.StoreSetting("NotifyURL", channel.ChannelUri.AbsoluteUri);
}
}
else
{
if (channel.ChannelUri != null)
{
StorageSettings.StoreSetting("NotifyURL", channel.ChannelUri.AbsoluteUri);
}
}
}