Windows Azure的通知枢纽错误 [英] Windows Azure Notification Hub Error

查看:153
本文介绍了Windows Azure的通知枢纽错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚得到这个错误。一切工作正常,直到今天早上。

I have just gotten this error. Everything was working fine up until this morning.

错误:400 - 因为通知中心是在一个旧版本创建的请求API版本是无效的。重新创建的通知中心。

Error: 400 - The request api-version is invalid because the the notification hub was created in an older version. Re-create the notification hub.

TrackingId:aaed084f-8c8a-49f1-8246-122763437b63_G7,时间戳:2016年5月15日上午3时56分十三秒

TrackingId:aaed084f-8c8a-49f1-8246-122763437b63_G7,TimeStamp:5/15/2016 3:56:13 AM"

在我的node.js表脚本我连接到集线器,像这样:

In my node.js table script I am connecting to the hub like so:

var azure = require('azure');

var hub = azure.createNotificationHubService('hubName','connectionString');

和发送像这样:

hub.wns.sendRaw(['public'], JSON.stringify(item), function(error){
    if(!error)
        console.log("total refresh " + JSON.stringify(item));
    else
       console.log("error sending total refresh " + JSON.stringify(error));
});

错误响应不断射击。我试着重新创建通知中心,但仍然得到同样的错误。

The error response keeps firing. I tried recreating the notification hub but still get the same error.

是否有人知道为什么吗?微软已经更新了其系统?我是否需要包含的更新我的JavaScript Windows应用商店的应用程序?

Does anybody know why? Have Microsoft updated their systems? Do I need to include an update for my javascript windows store application?

三江源

推荐答案

的问题是SDK的NodeJS没有设置API版本在所有:)
您可以通过评论湛蓝-SB模块中的这些行暂时解决这一问题(或者更好的办法解决它以某种方式):

The problem is that nodejs sdk doesn't set the api-version at all :) You can temporarily fix this by commenting these lines in the azure-sb module (or fix it in better way somehow):

蔚蓝-SB / lib目录/ servicebusserviceclient.js @ 67行:

azure-sb/lib/servicebusserviceclient.js @ line 67:

// Set API version
//  if (webResource.queryString[Constants.ServiceBusConstants.API_VERSION_QUERY_KEY] === undefined) {
        webResource.withQueryOption(Constants.ServiceBusConstants.API_VERSION_QUERY_KEY, Constants.ServiceBusConstants.CURRENT_API_VERSION);
// } else if (webResource.queryString[Constants.ServiceBusConstants.API_VERSION_QUERY_KEY] === null) {
//   delete webResource.queryString[Constants.ServiceBusConstants.API_VERSION_QUERY_KEY];
// }

总之,等待微软解决这个愚蠢的错误...

Anyway, waiting for Microsoft to fix this dumb error...

这篇关于Windows Azure的通知枢纽错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆