Windows Azure 通知中心错误
Windows Azure Notification Hub Error
我刚收到这个错误。直到今天早上一切正常。
错误:400 - 请求 api-version 无效,因为通知中心是在旧版本中创建的。重新创建通知中心。
TrackingId:aaed084f-8c8a-49f1-8246-122763437b63_G7,TimeStamp:5/15/2016 3:56:13 上午"
在我的 node.js table 脚本中,我像这样连接到集线器:
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));
});
错误响应不断触发。我尝试重新创建通知中心,但仍然出现相同的错误。
有人知道为什么吗?微软有更新他们的系统吗?我需要为我的 javascript windows 商店应用程序添加更新吗?
谢谢
问题是 nodejs sdk 根本没有设置 api-version :)
您可以通过在 azure-sb 模块中注释这些行来临时解决此问题(或以某种更好的方式修复它):
azure-sb/lib/servicebusserviceclient.js @ 第 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];
// }
无论如何,等待微软修复这个愚蠢的错误...
是的,谢谢@Peter。
我在根 "azure-sb-temp" 中创建了临时模块,在我的通知服务中导入而不是 "azure",安装了包 "azure-common" 和 "underscore"。最后一件事是评论@第 69、71、72、73 行 /azure-sb-temp/lib/servicebusserviceclient.js
我刚收到这个错误。直到今天早上一切正常。
错误:400 - 请求 api-version 无效,因为通知中心是在旧版本中创建的。重新创建通知中心。
TrackingId:aaed084f-8c8a-49f1-8246-122763437b63_G7,TimeStamp:5/15/2016 3:56:13 上午"
在我的 node.js table 脚本中,我像这样连接到集线器:
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));
});
错误响应不断触发。我尝试重新创建通知中心,但仍然出现相同的错误。
有人知道为什么吗?微软有更新他们的系统吗?我需要为我的 javascript windows 商店应用程序添加更新吗?
谢谢
问题是 nodejs sdk 根本没有设置 api-version :) 您可以通过在 azure-sb 模块中注释这些行来临时解决此问题(或以某种更好的方式修复它):
azure-sb/lib/servicebusserviceclient.js @ 第 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];
// }
无论如何,等待微软修复这个愚蠢的错误...
是的,谢谢@Peter。 我在根 "azure-sb-temp" 中创建了临时模块,在我的通知服务中导入而不是 "azure",安装了包 "azure-common" 和 "underscore"。最后一件事是评论@第 69、71、72、73 行 /azure-sb-temp/lib/servicebusserviceclient.js