【发布时间】:2016-11-06 18:00:31
【问题描述】:
我正在使用 Azure 通知中心向我的 Android 和 iOS 移动应用用户发送推送通知。
当我登录 Azure 门户并向设备 ID 发送测试消息时,它可以正常工作。
我使用从 Azure 门户获得的策略名称为 DefaultFullSharedAccessSignature 的连接字符串创建了 NotificationHubClient。
NotificationHubClient.CreateClientFromConnectionString("Endpoint=sb://redacted.servicebus.windows.net/;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=redacted", "redacted");
我目前正在尝试以最简单的方式发送通知:
Notification notification = new GcmNotification(message);
PushNotifications.Instance.Hub.SendNotificationAsync(notification, fakeUser.Devices).Wait();
我得到一个AggregateException,里面有一个Microsoft.Azure.NotificationHubs.Messaging.MessagingCommunicationException。
我可以从内部异常中看到的相关细节:
Message: 无法连接到远程服务器Inner Exception Message: 无法建立连接,因为目标机器主动拒绝了它 23.101.228.99:443 (似乎是 Microsoft IP 地址) Detail.ErrorCode: 60000Detail.ErrorLevel: Microsoft.Azure.NotificationHubs.Messaging.MessagingExceptionDetail.ErrorLevelType.UserError
【问题讨论】:
-
你是怎么解决你的问题Coxy的?我也面临同样的问题。请帮我解决问题
-
@PraveenBaruri 恐怕我们从未解决过这个问题。如果你遇到它很好,那么我猜 MS 从未修复 NotificationHubClient 以通过 HTTP 代理工作。
-
我们今天早上在推送客户端上收到了这个错误消息。我们重新启动了软件,它开始工作,非常阶段。几乎就像 azure 推送通知 clinet 中的错误。
标签: .net azure push-notification azure-notificationhub