我正在努力让一个简单的节点应用程序使用 iisnode 在 IIS 上运行。这是应用程序:
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);
这是我得到的错误:
Application has thrown an uncaught exception and is terminated:
Error: listen EACCES
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1020:19)
at listen (net.js:1061:10)
at Server.listen (net.js:1127:5)
at Object.<anonymous> (C:\Program Files\iisnode\www\helloworld\hello.js:6:4)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
因为这是在我的开发盒上,所以我已授予 app_pool 超级用户权限,但这并没有帮助。