【问题标题】:send push notification with Azure Notification Hub (Unauthorized 401)使用 Azure 通知中心发送推送通知(未经授权的 401)
【发布时间】:2015-11-20 18:35:17
【问题描述】:

我想向 iPhone 发送推送通知。如果我从 Azure 通知中心 - 网站发送消息,它工作正常,但我无法从我的 c# 控制台应用程序发送通知。

我已添加 Microsoft.Azure.NotificationHubs - Nuget 包,

        var client = NotificationHubClient.CreateClientFromConnectionString ( HUBLISTENACCESS, HUBNAME );

        client.SendAppleNativeNotificationAsync ( json ).ContinueWith (
            t => {
                Console.WriteLine (t.Result );
            } );

        Console.ReadLine();

但它会引发异常“未授权 401”。

我希望任何人都可以提供帮助。 问候 罗尼

【问题讨论】:

    标签: azure console-application azure-notificationhub


    【解决方案1】:
    var client = NotificationHubClient.CreateClientFromConnectionString ( HUBLISTENACCESS,
    

    问题是 LISTENACCESS 键没有 SendOperations 的权限。您可以尝试使用 FULLACCESS 键吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-12
      • 2021-08-03
      • 1970-01-01
      相关资源
      最近更新 更多