Tag: azure

在服务器端的Azure移动服务令牌上解密或validation签名

按照指南创buildAzure移动服务的自定义身份提供商后,我可以轻松生成相应的令牌。 代码非常简单,如下所示: var userAuth = { user: { userId : userId }, token: zumoJwt(expiry, aud, userId, masterKey) } response.send(200, userAuth); zumoJwt的参数和代码的定义位于链接处。 Azure会自动解码令牌,并将请求对象上的用户填充到我想要模拟的对象中。 基本上我想通过节点(而不是.net)解密服务器端的令牌。

使用node.js发布到Neo4j服务器

免责声明:这与我在这里问的另一个问题有关。 我被build议提出一个新的问题,而不是更新那个问题,我希望这是正确的。 如果不是,请让我知道并忽略这个问题。 我一直在尝试在Microsoft Azure中使用Neo4j,使用本教程 。 我创build了一个运行Linux和neo4j的虚拟机。 我知道他的工作很好,因为我已经能够通过Webpipe理员门户访问数据库,在那里我可以创build和删除条目。 但是,当我尝试使用node.js来插入元素时,问题来了。 这里是脚本的代码: function insert(item, user, request) { //comment to trigger .js creation var neo4j = require('neo4j'); var db = new neo4j.GraphDatabase('http://<username>:<password>@neo4jmobile.cloudapp.net:7474'); var node = db.createNode({ name: item.name }); node.save(function (err, node) { if (err) { console.error('Error saving new node to database:', err); } else { console.log('Node saved […]

Azure上的Node.js + MongoLab,如何防止网站闲置?

我将我的node.js + MongoDB应用程序部署到Azure网站,我使用MongoDB和MongoLab插件。 我注意到,在每次部署之后,我发送给应用程序的第一个请求不起作用,因为该站点仅在第一个请求上被初始化,那就是连接到MongoDB的时间。 另一个问题是,如果我暂时不使用网站,那么它似乎处于闲置状态,因为我第一次尝试访问它时,它不起作用,类似于第一个请求。 有没有办法迫使Azure在部署之后启动网站,并阻止网站进入睡眠状态? 更新 :我已经将网站从免费切换到标准 ,这似乎解决了第二个问题,似乎并没有进入睡眠状态。 第一个问题依然存在,我在我的app.js的开头放了一个console.log()调用,并用azure site log tail监视站点。 app.js只在第一个请求中执行。 但是,这不是一个大问题,因为自然我试着在浏览器中部署每个网站后打开网站,但是仍然有点奇怪。

如何使用节点设置Azure Blob存储CORS属性?

我一直在遵循blob服务和身份validation文档 ,以便从我的移动服务设置我azure blob存储帐户上的CORS属性。 我无法弄清楚我做错了什么。 服务器响应是: 在HTTP请求'JI … Tk ='中find的MAC签名与任何计算签名都不相同。 服务器用下面的string来签名:'PUT x-ms-date:Wed,19 Feb 2014 07:24:06 GMT x-ms-version:2013-08-15 / apporotest /?comp = properties' 当我loginstring签名(不传递contentMD5和内容types)在我的结尾,它变成了相同的string。 所以我想我的function来build立共享密钥是错误的。 这应该build立:Base64(HMAC-SHA256(UTF8(StringToSign))): function buildSharedKeyLite( verb, contentMD5, contentType, canonicalizedHeaders, canonicalizedResource ) { var stringToSign = verb + "\n" + contentMD5 + "\n" + contentType + "\n" + "" + "\n" + // date is […]

Azure copyBlob Node.js API错误

有没有人成功地使用copyBlob Node.js API将blob从一个容器复制到另一个容器? 我试图在服务器脚本中使用copyBlob API,但它总是给我错误,如“错误:容器名称格式不正确。” 我的代码结构是这样的: blobService.copyBlob(uri, containerName, blobName, function (error) { if (error != null) { console.log(error); } else { request.respond(); } }); 我的代码如下: 10 var blobService = azure.createBlobService('mystorage', accountKey, 'mystorage.blob.core.windows.net'); 11 12 blobService.copyBlob("http://mystorage.blob.core.windows.net/e0f57621-20a3-4e17-b418-c0139c6daef8/myimage.jpg", "container1", "myimage.jpg", function (error) { 13 if (error != null) { 14 console.log(error); 15 } else { 16 console.log("success"); 17 […]

有没有办法在package.json中检测需要编译的模块?

如果您的某个npm模块需要编译,则部署到azure站点将失败。 有没有一种简单的方法来审计packages.json,使不在Windows上的人可以更容易地知道他们什么时候会遇到问题?

Azure移动服务 – 获取更多用户信息

我inheritance了用XAML编写的Windows 8应用程序。 所以在C#中,当我打这个电话 user = await MobileServices.MobileService .LoginAsync(MobileServiceAuthenticationProvider.MicrosoftAccount); (这是Azure移动服务) 用户对象只给我Token和MicrosoftAccount:………….. 为了得到authentication的人,我需要能够看到世卫组织正在请求访问… 我看下面的文章,但我似乎失去了一些东西? 这篇文章中的JavaScript是我必须在Node.js中写的东西吗? 示例文章: http : //blogs.msdn.com/b/carlosfigueira/archive/2013/12/12/expanded-login-scopes-in-azure-mobile-services.aspx

在Windows Azure上部署节点/快速应用程序时出错

我目前正在试图在Azure上部署一个Express / Node.js应用程序而没有太多的成功 – 我得到的错误是: remote: > libxmljs@0.9.0 install D:\home\site\wwwroot\node_modules\libxmljs remote: > node-gyp rebuild remote: remote: remote: D:\home\site\wwwroot\node_modules\libxmljs>node "D:\Program Files (x86)\npm\1.3.11\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild remote: Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. remote: MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". […]

在Node js的Azure表存储中插入实体时,请添加PartitionKey

当调用insertEntity()时,这更多的是调用exception的帮助。 我在Azure上使用Nodejs并在摩纳哥进行编辑,而且我使用NPM安装了最新版本的Azure存储。 我遇到的exception是:(完整的堆栈跟踪底部) Unaughtexception:错误:函数entityOperation的参数entityDescriptor.PartitionKey应该是ArgumentValidator ._中的对象。extend.object 我基本上把我的对象保存,并创build2个新的属性: PartitionKey和RowKey 。 我给他们的string值。 我正在跟着例子 。 我没有使用entityGenerator,因为这里的示例没有这样做,而Azure Node开发人员门户上的示例却这样做。 如果需要,我不介意在存储特定的属性上使用entityGenerator,但是在azure github回购节点中的样本似乎表明您可以使用简单的string。 entityGenerator实际上看起来有点丑陋和麻烦,因为当你把它带回来的时候,你必须在实体上编写额外的代码。 如何调整我的代码来解决这个问题,并调用insertEntity()成功? exports.saveTally = function(tally, callback) { var tableSvc = getAzureTableService(); tableSvc.createTableIfNotExists("tally", function(error, result, response) { if (!error) { tally.PartitionKey="tally"; tally.RowKey = tally.id; tableSvc.insertEntity("tally", tally, function(error, result, response) { if (error) { console.log("*Error saving tally " + error.toString()); } else […]

Azure上的Node.js和HBase(HDInsight)

我正尝试从Node.js访问微软Azure上的HBase。 我查看了不同的库,如hbase和REST API(webhcat)。 我想要实现的是创build一个表并从节点上传数据。 后来我想对这个数据集进行查询。 不幸的是,Azure的文档在这个问题上并不是很有帮助,因为它专注于PowerShell和.NET SDK。 我发现一个相当有用的文章是这样的: http : //blogs.msdn.com/b/bigdatasupport/archive/2014/04/22/querying-hdinsight-job-status-with-webhcat-via-native-powershell-or -node-js.aspx查询作业状态对我来说工作正常,但是在适应请求以便上载和查询数据时,我有点卡住了。 这甚至可能与使用webhcat(以前的寺庙)API? 这个azure页面描述了如何使用configuration单元或REST API与HDInsight上的HBase进行交互: http ://azure.microsoft.com/en-us/documentation/articles/hdinsight-hbase-get-started/#hive-query ,我不知道是否有可能做到这一点与node.js而不是PowerShell? 我会非常感谢任何想法和主angular在正确的方向!