0

ことがある私は私の窓の上の紺碧通知ハブから8.1携帯電話のアプリを通知を受け取るために、昨日、このlinkを踏襲し、それが働いたが通知ハブRegistrationAuthorizationException

しかし、今日、それは

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> 

私は、このエラーを投げているました私のアプリは

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(); 
     } 

    } 
+0

Azureではどのサービスを使用していますか?あなたが使用している新しいApp Serviceコンテナであれば、代わりにこれを実行する必要があります:https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-windows-store-dotnet-get-/ – JTIM

答えて

0

を登録しようとしたとき、私App.xaml.csでInitNotificationsAsync方法では、この例外をスローあなたはエミュレータでそれを試しますか..? 時間同期が可能です。 これがエミュレータの場合は、時間を確認して手動で設定できますか?

+0

私はエミュレータからアプリケーションをアンインストールして再度デプロイして正常に動作していたが、数時間後に同じことが起こった –

+0

それは時間の問題ではないように見え始めているが、とエミュレータの時間?あなたの反応からは明らかではありません。あなたはそれを実際のデバイスに配備しようとしましたか? –

+0

時が違う –

関連する問題