Tag: azure

Azure无效的发布设置文件

为了连接和debuggingAzure网站上的node.js程序,我需要使用publishSettings文件。 当我从Azurepipe理控制台下载一个,并尝试导入它时,我得到以下内容: c:\>azure account import "MyServices.azurewebsites.net.PublishSettings" info: Executing command account import error: Invalid publishSettings file. Use "azure account download" to download publishing credentials. info: Error information has been recorded to azure.err error: account import command failed 当我尝试使用“azure帐户下载”命令时,它会打开一个浏览器窗口,然后从azurepipe理系统给我一个500错误。 当我尝试从Azure PowerShell命令执行此操作时,也会发生同样的情况。 谢谢

node.js http和bingsearchapi

我正尝试使用必应searchAPI来返回一个JSONstring。 我第一次尝试使用以下url按照Azure的探索网站( https://datamarket.azure.com/dataset/explore/5BA839F1-12CE-4CCE-BF57-A49D98D29A44 ): 'https://api.datamarket.azure.com/Bing/Search/v1/Composite?Sources=%27web%27&Query=%27NGI%20SPA%27&Market=%27en-US%27' 之后,我发现了一个SO线程使用新的Bing API(nodejs) ,它build议我使用表单的url: https://user:<YourDefaultAccountKey>@api.datamarket.azure.com/Bing/SearchWeb/Web?Query=%27leo%20fender%27&Market=%27en-US%27&$top=50&$format=JSON 这两个返回状态401(authentication失败): STATUS: 401 HEADERS: {"content-type":"application/json; charset=utf-8","server":"Microsoft-IIS/8.0","jsonerror":"true","x-powered-by":"ASP.NET","access-control-allow-origin":"*","access-control-allow-credentials":"false","access-control-allow-headers":"Authorization, DataServiceVersion, MaxDataServiceVersion","access-control-expose-headers":"DataServiceVersion, MaxDataServiceVersion","access-control-allow-methods":"GET, POST, OPTIONS","access-control-max-age":"604800","date":"Wed, 02 Jul 2014 17:23:29 GMT","content-length":"91"} BODY: {"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""} 我也尝试了其他各种url的组合,无济于事。 我的代码如下: var url = require('url'); var http = require('http'); var serviceRootURL = 'https://api.datamarket.azure.com/Bing/Search/v1/Composite?Sources=%27web%27&Query=%27NGI%20SPA%27&Market=%27en-US%27' var params = 'hi'; var dataURL = url.parse(serviceRootURL); […]

节点的应用程序与azure

我有这个app.js代码,使端口上的调用:3000和:3001 http = require('http'); var express = require('express'); var app = express(); var server = http.createServer(app).listen(3001); var io = require('socket.io').listen(server,{log:false, origins:'*:*'}); 在底部是 .listen(3000); 所以对于我在蔚蓝的networking应用程序,我不认为:3001打开正确 在我的本地机器上,我可以浏览在localhost:3000端口上的这个文件夹资产,但是到达/socket.io/socket.io.js目录我必须使用localhost:3001这是代码结构的一部分来执行我们的任务想。 我已经跑了很多节点和azure色的实验室,但他们都没有做这个特殊的设置,如果我去命令提示符,并在本地运行app.js,我的networking应用程序在线再次工作,所以我假设端口3001在本地打开我的计算机,而在Azure主机3000上,我需要某种方式使networking应用程序既可以在不运行虚拟机的情况下执行,我也不完全确定在azure色的networking应用程序中所有可能的function。

发送消息时从Azure IoT Hub Libary发生错误

Im使用Node.JS库供Azure IoT Hub发送一些遥测数据,而且我得到了从库中抛出的以下错误 未处理的拒绝TypeError:无法在Amqp的C:\ Source \ Messenger \ app.js:156:17处读取未定义的属性'on'。 (C:\ Source \ Messenger \ node_modules \ azure-iot-device \ node_modules \ azure-iot-common \ lib \ amqp.js:157:17)在C:\ Source \ Messenger \ node_modules \ azure-iot-device \在C:\ Source \ Messenger \ node_modules \ azure-iot-device \ node_modules \ azure-iot-common \ lib \ amqp.js:84:17下的node_modules \ azure-iot-common \ lib \ amqp.js:54:19 at […]

Azure应用程序服务的共享代码(移动应用程序)

所以,Parse关机让我急于为正在发布的应用程序find合适的备份计划。 我一直在考虑将Microsoft Azure作为替代品,并开始使用Azure移动服务进行testing。 实际上这样做很好,但是我一直注意到很多这样的消息: 注:这是一个Azure移动服务主题。 Microsoft Azure推荐Azure App Service移动应用程序用于所有新的移动后端部署。 要开始使用Azure App Service移动应用程序,请参阅应用程序服务移动应用程序文档中心。 好的,我一直在寻找应用服务。 我已经阅读了很多文档,有时可能会造成混淆,因为有些链接似乎没有指向正确的“版本”。 有时,“应用程序服务”链接最终将出现在“移动服务”文章中。 他们的名字很接近,可能会令人困惑和沮丧。 但承诺如下: 移动应用程序是App Service中的新应用程序types,它集成了移动服务等所有function。 移动应用程序正在公开预览。 无论如何,对于移动服务来说,有一点是很难find的,而且到目前为止,已经certificate不可能find应用服务,这与共享代码有关。 一个重要的原因是,在Azure门户(旧的或新的)中看起来没有真正的共享代码,更不用说他们的在线编辑器。 我无法看到在我的自定义应用程序服务API中应该如何或在哪种代码。 例如,下面是使用WebStorm通过Git检出项目结构的比较: 移动服务项目结构 应用服务项目结构 现在,当我查看App Services项目中的app.js文件时,我看到以下几行代码: // Import the files from the tables directory to configure the /tables endpoint mobile.tables.import('./tables'); // Import the files from the api directory to configure the /api endpoint […]

在NodeJS应用程序中显示来自AlwaysEncrypted列的数据?

我在Azure中有一个SQL Server数据库,由.NET应用程序和NodeJS应用程序访问 。 我只是将AlwaysEncrypted应用于包含敏感信息的表列。 我使用Azure密钥保pipe库来存储encryption密钥。 我想知道是否有可能在我的NodeJS应用程序中显示(解密)的数据? 解决这个问题的方法是通过.NET应用程序中的API端点公开要查询的数据,然后从NodeJS应用程序中调用该端点,但是我正在寻找一种更优雅的方法 。

Azure + Node Js服务总线持久订阅主题

使用节点js我想为Azure服务总线服务主题创build持久订阅。 现在只执行一次。 请引导我,我是新来的这个。 提前致谢。 我正在使用以下代码来订阅主题。 var azure = require('azure'); var azureConnection = "Endpoint=sb:My connection string" var retryOperations = new azure.ExponentialRetryPolicyFilter(); var serviceBusService = azure.createServiceBusService(azureConnection).withFilter(retryOperations); serviceBusService.receiveSubscriptionMessage('mytopic01', 'mytopicsub', function (error, receivedMessage) { if (!error) { // // // Message received and deleted console.log(receivedMessage); } }); 另外我不想使用setInterval函数。 我想解决如果消息发布到主题,它应该自动触发订阅。

设置根path以在Azure上提供index.html(IIS Web服务器)

我有一个相当标准的节点应用程序部署到Azure。 默认情况下,对于http:www.example.com/my_path的请求,Azure会添加一个web.config xml文件来设置IIS,以便: a)查看/public文件夹中是否存在匹配/my_path的静态文件 b)将所有其他请求路由到nodejs应用程序。 除了根path( http:www.example.com/ )之外,我想要的只是显示public/index.html ,并将path路由到节点应用程序。 我无法做到这一点。 以下是我的web.config的相关部分: <!– First we consider whether the incoming URL matches a physical file in the /public folder –> <rule name="StaticContent"> <action type="Rewrite" url="public{REQUEST_URI}"/> </rule> <!– All other URLs are mapped to the node.js site entry point –> <rule name="DynamicContent"> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/> <!– […]

package.json中使用bitbucket在Azure上部署Angular2项目时出错

我正面临在azure上部署angular2应用的问题。 我在下面的行中遇到错误 "engines":{"node":"6.2.1"}, 我已经给出了这个版本,因为WEBSITE_NODE_DEFAULT_VERSION的值是6.2.1。 任何人有这个想法然后请分享。 这是错误快照: package.json看起来如下所示: { "name": "angular-quickstart", "version": "1.0.0", "engines":{"node":"6.2.1"}, "description": "QuickStart package.json from the documentation, supplemented with testing support", "scripts": { "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", "docker-build": "docker build -t ng2-quickstart .", "docker": "npm run docker-build && docker run -it –rm -p 3000:3000 -p 3001:3001 ng2-quickstart", "pree2e": "npm […]

在Azure函数上使用ImageMagick或GraphicsMagick

我正在尝试查看我的公司是否可以使用Azure函数将TIFF文件的转换自动转换为多种JPG和PNG格式和大小。 我使用Node.js函数,但也可以使用其他语言。 我的问题是,我无法得到GraphicsMagick或ImageMagickfunction。 我使用正常的程序安装使用npm安装 。 它似乎安装好,模块也似乎加载,但是当我尝试处理文件时没有任何反应。 没有什么,也没有错误。 var fs = require('fs'); var gm = require('gm'); module.exports = function(context,req){context.log('Start …'); try { context.log('Looking for GM…'); context.log(require.resolve("gm")); } catch(e) { console.log("GM is not found"); process.exit(e.code); } gm('D:/home/site/wwwroot/HttpTriggerJS1/input/870003-02070-main-nfh.jpg') .resize(240, 240) .noProfile() .write('D:/home/site/wwwroot/HttpTriggerJS1/output/resize.jpg', function (err) { context.log('TEST'); if (!err) { context.log('done'); } } ); context.done(null, res); }; 我不确定这是甚至可能的,但我还没有发现任何信息说明它不能 。 […]