【发布时间】: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