我正在开发一个 WP-8.1 Silverlight 应用程序,并尝试通过 azure 通知中心为我的应用程序注册 WNS 通知服务,但我正在注册 MPNS,而不是在构建时代码中没有错误,并且已将 WMappmanifest 中的通知服务更改为当我在通知中心看到我的注册时,WNS 在通知中心也有更新的凭据,它显示 MPNS 而不是 WNS
var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
var hub = new NotificationHub(AzureNotificationHubName,AzureNotificationHubCnxString);
var result = await hub.RegisterNativeAsync(channel.Uri);
// Displays the registration ID so you know it was successful
if (result.RegistrationId != null)
{
PushChannel = channel;
PushChannel.PushNotificationReceived += OnPushNotification;
}