Tag: azure web sites

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 […]

Azure网站+ node.js – 无法获取/

将一个node.js / express应用程序部署到Azure网站时,在浏览器中出现“无法获取/”错误。 相同的应用程序在本地机器上完美运行。 web.config是标准的(我只是删除了静态重写规则),所以: <!– All other URLs are mapped to the node.js site entry point –> <rule name="DynamicContent"> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/> </conditions> <action type="Rewrite" url="src/server/app.js"/> </rule> </rules> 代码部署在src/server/ (节点函数)和src/client/ (静态内容)文件夹中。 根据FREB日志提取src / server / apps.js,但最后引发下面的错误: ErrorCode The system cannot find the file specified. (0x80070002) 在app.js里面我对静态文件有如下configuration: app.use(express.static('./src/client/'));

无法连接到数据库 – EADDRNOTAVAIL

我有一个简单的node.js应用程序无法连接到SQL Db。 Web服务器是Azure Web App,运行node.js并使用Tedious for SQL。 数据库是Azure SQL数据库。 这是详细的错误: {message:'无法连接到xxx.database.windows.net:1433 – undefined',代码:'ESOCKET'} 星期四2016年1月14日星期三08:05:05 GMT + 0000(世界协调时间):无任何exception:ConnectionError:连接丢失 – 在Connection处连接EADDRNOTAVAIL 。 (D:\ home \ site \ api \ node_modules \ tedious \ lib \ connection.js:797:26)。 (net.js:301:14)上的Socket.emit(events.js:88:20)上的(D:\ home \ site \ api \ node_modules \ tedious \ lib \ connection.js:33:15)在EventEmitter._tickCallback(node.js:190:38) 它适用于我的机器,有趣的是,这也适用于另一个Azure Web应用程序! 我试图重新启动这个networking应用程序,什么不…什么是这个错误的意思?

404azure色的网站上的错误

我们已经在“F1免费”层中设置了一个基于AppService的Azure网站(使用Node.js)。 当我们浏览网站中的JSON文件时,经常遇到404找不到的错误。 但是,当我们在浏览器中刷新时,就会加载。 为什么会发生这种情况,如何解决这个问题? 这是我们应该意识到的一个更大问题的症状吗?

如何让Azure nodejs webapp重新运行npm install?

我正在Azure上运行Node web应用程序。 我使用“local git”方法部署应用程序。 每当我对源代码进行更改,提交,然后使用git push azure master进行部署时,网站上的代码将按预期更新。 但我最近的一个变化包括添加一个新的包到我的package.json文件。 现在,当我部署时,我的文件被更新,但azure似乎并没有重新运行npm install ,并且没有安装新的模块。 这意味着应用程序不会启动:当我的代码调用require('missingModuleName')它会得到一个致命的错误并停止。 上次我有这个问题,我从Azure中删除了应用程序,并从头创build一个新的。 但我希望有一个更简单的解决scheme。 我看到(在https://github.com/projectkudu/kudu/wiki/Deployment )部署“对于节点站点,Kudu在wwwroot文件夹中运行'npm install'”。 我不确定标准的“local git”部署方法是否调用Kudu部署过程。 我是否需要创build一个部署钩子(如https://github.com/projectkudu/kudu/wiki/Deployment-hooks中所述 )? 安装日志显示: 2017-07-29T07:59:51 Updating branch 'master'. 2017-07-29T07:59:52 Updating submodules. 2017-07-29T07:59:52 Preparing deployment for commit id '556a34aab5'. 2017-07-29T07:59:52 Running custom deployment command… 2017-07-29T07:59:52 Running deployment command… 2017-07-29T07:59:52 Command: deploy.cmd 2017-07-29T07:59:53 Handling node.js deployment. 2017-07-29T07:59:53 KuduSync.NET […]

Azure网站:Kudu无法安装

我昨天开始遇到这个问题。 我运行时部署失败: npm install kudusync -g 出现以下错误: Error: SSL Error: CERT_UNTRUSTED 从一些search看来,Kudu的一个依赖项是自签名的或未签名的。 似乎我可以禁用节点的SSL检查 – 但这似乎是一个危险的select,不build议。 有谁知道任何其他解决方法? azure色的输出如下: remote:npm http GET https://registry.npmjs.org/kudusync[K remote:…… [K remote:npm http GET https://registry.npmjs.org/kudusync[K remote:………………………… ……………………. [K remote:npm http GET https://registry.npmjs.org/kudusync[K remote:npm ERR! 错误:SSL错误:CERT_UNTRUSTED [K 远程:npm ERR! 在ClientRequest。 (d:\ Program Files(x86)\ nodejs \ node_modules \ npm \ node_modules \ request \ main.js:440:26)[K […]

Azure Web App:激活应用程序日志超过12小时

对于Azure Web应用程序,是否可以使应用程序日志活动超过12小时? 我有一个Node.js部署,随机运行到数据库连接问题,我不能追查,因为他们每两天或三天发生。 由于debugging的原因,我想有这个问题的日志logging输出,但我没有find一种方法来这样做? 有没有人find这个解决scheme?

Express应用程序在azure色上投掷500个

下面的代码在本地运行完美… var express = require('express'); var app = express(); app.get('/', function (req, res) { res.send("Hello World"); }); var port = 8080; app.listen(port, function () { console.log('Server started and is listening on port ' + port); }); 但是,当我部署到azure,我得到一个500错误。 这是我的发现… 我已经接受了这个build议 已经尝试了所有可能的组合server.js,app.js,目录结构等 代码正在从本地的git仓库进行部署。

在Azure网站中运行nodeJS站点

我正在尝试在Windows Azure网站中运行nodeJS站点。 我只是推着两个文件: server.js package.json 和我所有的模块从npm install 。 它在当地正常工作,但是当我浏览WA网站时,我只能得到: The page cannot be displayed because an internal server error has occurred. 我使用CLI获取尾部日志,但我只看到这个: <h3>HTTP Error 500.0 – Internal Server Error</h3> <h4>The page cannot be displayed because an internal server error has occurred.</h4> </div> <div class="content-container"> <fieldset><h4>Most likely causes:</h4> <ul> <li>IIS received the request; however, an internal […]

将节点本地模块部署到Azure WebSites

我正在尝试将以下示例节点应用程序部署到Azure网站: var http = require('http'); var port = process.env.port || 1337; http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': 'text/html' }); try { var canvasModule = require('canvas'), canvas = new canvasModule(200, 200), ctx = canvas.getContext('2d'); ctx.rotate(0.5); ctx.font = '30px Impact'; var message = "Hello World"; ctx.fillText(message, 40, 40); ctx.strokeRect(30, 5, 160, 50); res.end('<html><img src="' + canvas.toDataURL() […]