Windows 7 IIS 7.5 上的 iisnode 抛出 500.19 错误

Gri*_*mer 5 iis node.js iisnode

我已按照此github页面上提到的步骤进行操作。但即使在完成上述所有操作之后,在尝试运行由 issnode 包附带的 setupsamples.bat 文件安装的示例应用程序时,我仍然不断收到内部服务器错误。

我已附上屏幕截图和相关代码文件。

issnode 主页似乎工作正常

你好世界崩溃

这是 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);  
Run Code Online (Sandbox Code Playgroud)

和 web.config 文件

<configuration>
   <system.webServer>

    <!-- indicates that the hello.js file is a node.js application 
    to be handled by the iisnode module -->

    <handlers>
      <add name="iisnode" path="hello.js" verb="*" modules="iisnode" />
    </handlers>

  </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

Yus*_*han 8

确保处理程序映射在功能委托下是读/写的,如下所示 ScreanShot

在此输入图像描述

在此输入图像描述


jis*_*shi 4

这是因为您在服务器级别的配置在站点级别上是不可覆盖的。由于您要添加一个处理程序,我认为需要解锁的是处理程序配置。您应该能够通过 iis 配置程序执行此操作,或者您可以使用 appcmd 来解锁它。

您可以在这里阅读更多相关信息:http://www.iis.net/learn/get-started/planning-for-security/how-to-use-locking-in-iis-configuration

http://www.tomdupont.net/2012/10/how-to-unlock-configuration-section.html