Tag: iisnode

iisnode在Windows 7 IIS 7.5投掷500.19错误

我已经按照这个github页面上提到的步骤。 但即使做了上述所有事情之后,我一直在尝试运行由issnode软件包附带的setupsamples.bat文件安装的示例应用程序,但仍经常发生内部服务器错误。 我附上了屏幕截图和相关的代码文件。 这是hello.js文件 var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end('Hello, world! [helloworld sample; iisnode version is ' + process.env.IISNODE_VERSION + ', node version is ' + process.version + ']'); }).listen(process.env.PORT); 和web.config文件 <configuration> <system.webServer> <!– indicates that the hello.js file is a node.js application to be handled by the iisnode […]

在iisnode上运行时从nodeJS应用程序执行cmd命令不起作用

我们有一个从CMD执行一个小命令的web应用程序 require('child_process').execSync 当我使用npm start运行服务时,所有工作都很完美,但是当我们将其移动到iisnode时,它停止工作。 例如: p4 depots不能工作了。 IIS由Admin用户运行。 如果我直接从cmd运行命令它可以工作,但是当我从iisnode调用它时,它不会。 错误: {“Error”:true,“Message”:“Error p4 CMD”,“Origmsg”:{“killed”:false,“code”:1,“signal”:null,“cmd”:“C:\ Windows \ system32 \ cmd.exe / s / c \“p4 depots \”“}} 过去有没有人有同样的问题?

端口在IISNode上运行的Azure Node.js应用程序中未定义

我有一个使用IISNode运行Node.js应用程序的Azure应用程序服务。 问题是process.env.PORT是未定义的。 我已经读过IISNode使用一个叫做命名pipe道的东西,并且端口信息可能不易读(?),但是在我的情况下,我只能得到未定义的信息。 我尝试部署的项目可以从GitHubfind 。 我有一个Web.config文件定义,它看起来像这样: <handlers> <!– indicates that the app.js file is a node.js application to be handled by the iisnode module –> <add name="iisnode" path="index.js" verb="*" modules="iisnode" /> </handlers> <rewrite> <rules> <!– Don't interfere with requests for node-inspector debugging –> <rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true"> <match url="^index.js\/debug[\/]?" /> </rule> <!– First we consider […]

ExpressJS:自定义错误模块不能识别此错误

我正在运行一个Express.JS后端,并设置为返回一个自定义消息422错误,如果用户尝试注册一个已经在使用的电子邮件,如下所示: const existingUser = await User.findOne({ email: email }); if (existingUser) { return res.status(422).send({ error: 'Email is already in use' }); } 不过,我在前面看到的回应是这样的: "response":{"data":"The custom error module does not recognize this error.","status":422,"statusText":"Unprocessable Entity" 显然,有些东西正在改变前端的错误。 我现在正在本地运行此开发,但生产部署到Azure,所以我有一个Web.config文件和一个iisnode.yml。 我已经将此代码添加到前者,以确保它不会导致问题: <system.webServer> <httpErrors existingResponse="PassThrough"> </httpErrors> </system.webServer> 我如何去解决这个问题?

node.exe进程与IISNode进程停止运行

我正在使用iisnode来运行我的node.js应用程序。 然而,大约一个小时后,node.exe进程停止运行(我需要它运行,因为我有一个每隔几秒从数据库中提取数据的setInterval()方法)。 有什么build议? 另外,如果我用process.env.PORT设置我的服务器,如何在客户端使用socket.io连接到它? 我明白,我必须使用 io.configure(function () { io.set("transports", ["xhr-polling"]); // no websockets io.set("polling duration", 10); io.set("log level", 1); // no debug msg });

iisnode 500.21处理程序“iisnode”在其模块列表中有一个错误的模块“iisnode”

在Server 2008 R2 64位,IIS 7.5,iisnode 0.2.4.0,node.js 0.10.5上获取此错误 – HTTP错误500.21 – 内部服务器错误 处理程序“iisnode”在其模块列表中有一个错误的模块“iisnode” 详细的错误信息 模块 – IIS Web Core 通知 – ExecuteRequestHandler 处理程序 – iisnode 错误代码 – 0x8007000d 请求的url – https://sub.domain.com:443/node/helloworld/hello.js 物理path – C:\ Program Files \ iisnode \ www \ helloworld \ hello.js login方法 – 匿名 login用户 – 匿名 我已经确定,按照我遇到的其他post的build议安装asp.net。 我可以访问localhost / node / helloworld的helloworld […]

如何在azure网站子目录中运行node.js应用程序

我已经创build了一个使用Azure的网站,我想在一个子目录(例如app1 / test)中运行一个node.js应用程序,而不是创build一个新的网站并在根目录下运行应用程序。 这是我的目录结构 -wwwroot / web.config中 -wwwroot / index.html的 -wwwroot / APP1 /testing/的package.json -wwwroot / APP1 /testing/ server.js 所以有一个index.html在根目录中,然后我在test子目录中的server.js。 这是我的server.js: var http = require('http'); var port = process.env.port || 1337; http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello World\n'); }).listen(port); 这是我的package.json: { "name": "test", "version": "0.0.0", "description": "test", "main": "server.js", "author": { […]

最小的azure node.jsconfiguration服务.js文件作为纯文本,而不是处理它们

我想configurationazure“网站”服务来使用我自己的web.config (更好的日志控制)。 我在我的git部署node.js项目的根目录下创build了一个简单的web.config : <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <handlers> <add name="iisnode" path="src\server.js" verb="*" modules="iisnode"/> </handlers> </system.webServer> </configuration> 我部署和访问azure色的网站后,它显示了src\server.js内容,而不是作为iisnode应用程序处理:(我知道这是一些愚蠢的错误,但谷歌search出奇怪的痛苦 – 所有我的search拼写为“纯文本“被无数”如何通过iisnode服务器静态内容“排斥:(而且从头学习所有iis / iisnode / web.config机器对于我的简单任务来说有点矫枉过正。任何提示要添加到这个web.config所以iis会处理server.js作为iisnode脚本,而不是一个纯文本? 更新 检查通过azure向导创build的node.js存储库,我发现只有当server.js位于src子目录时才会出现问题。 如果它位于根目录中,所有工作正常。 任何暗示为什么这样的行为iisnode ? 我想要subdirs :(。任何文件,他们不被允许?

iisnode的性能非常慢

我发现iisnode比使用节点命令慢。 使用iisnode有很多好处 ,但性能不好。 我从这里使用configuration文件。 任何想法如何加快? 更新: 我注意到每个页面调用都会重新连接一个新的mongodb连接。 我怎样才能防止它?

iisnode不会运行Express

我试图运行使用iisnode快递。 我遵循了所提供的示例,但是当尝试使用最新的Express版本和基本示例时,无法使其工作。 我得到的错误Cannot GET /node/parislight/hello.js和其他时间,只是一个The webpage cannot be found 。 我创build了一个hello.js文件(主要快速文件)从快速文档取自。 var express = require('express') var app = express() app.get('/', function (req, res) { res.send('Hello World!') }) var server = app.listen(process.env.PORT, function () { var host = server.address().address var port = server.address().port console.log('Example app listening at http://%s:%s', host, port) }) 我添加了必要的web.config文件(从iisnode中的快速示例中提取) <configuration> <system.webServer> <!– indicates […]