【发布时间】:2017-09-29 13:34:45
【问题描述】:
我有两个通知中心客户端(nodejs 和 C#),都用于将消息推送到中心。
Node 客户端发送完美,但 C# 客户端完成时发送 no 消息。
下面是每个客户端使用的sn-ps。
C#
NotificationHubClient hub = NotificationHubClient.CreateClientFromConnectionString("<Connection String>", "<Hub Name>");
var notice = @"{'aps':{'alert':'Notification Hub test notification'}}";
var result = await hub.SendAppleNativeNotificationAsync(notice, "<tag>");
Console.WriteLine(result.State);
NodeJS
var azure = require('azure');
var notificationHubService = azure.createNotificationHubService('<Hub Name>','<Connection String>')
var notice = "{'aps':{'alert':'Notification Hub test notification'}}"
notificationHubService.apns.send("<tag>", notice, function(error, res){
console.log(res);
});
在发送 Android 通知和直接从 Azure 门户测试功能发送的消息时,两者都可以正常工作。
任何帮助将不胜感激。
【问题讨论】:
标签: c# azure push azure-notificationhub azure-servicebus-queues