Ich folgte dieser link gestern Benachrichtigung von azur Benachrichtigung Hub auf meinem Windows 8.1 Telefon-App zu empfangen und es funktionierte aberMitteilung Hub RegistrationAuthorizationException
Aber heute ist es wirft mir diesen Fehler
An exception of type 'Microsoft.WindowsAzure.Messaging.RegistrationAuthorizationException' occurred in mscorlib.ni.dll but was not handled in user code
Additional information: HTTP request failed.
HTTP Details:
Status: 401
Reason: Unauthorized
Full content: <Error><Code>401</Code><Detail>ExpiredToken: .TrackingId:e27f22fb-5c9c-4028-8594-eacb71e5a35e_G1,TimeStamp:4/14/2016 10:29:33 AM</Detail></Error>
Es ist werfen diese Ausnahme in der InitNotificationsAsync
Methode in meinem App.xaml.cs wenn meine app
private async void InitNotificationsAsync()
{
var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
var hub = new NotificationHub("nameofhub", "myconnectionstring");
var result = await hub.RegisterNativeAsync(channel.Uri);
//Displays the registration ID so you know it was successful
if (result.RegistrationId != null)
{
var dialog = new MessageDialog("Registration successful: " + result.RegistrationId);
dialog.Commands.Add(new UICommand("OK"));
await dialog.ShowAsync();
}
}
Welchen Dienst verwenden Sie auf Azure? Wenn es der neue App Service-Container ist, den Sie verwenden, sollten Sie stattdessen Folgendes beachten: https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-windows-store-dotnet-get- started-push/ – JTIM