windows 7 IIS 7.5 上的 iisnode 抛出 500.19 错误
iisnode on windows 7 IIS 7.5 throwing 500.19 error
我已按照此 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 module -->
<handlers>
<add name="iisnode" path="hello.js" verb="*" modules="iisnode" />
</handlers>
</system.webServer>
</configuration>
这是因为您在服务器级别的配置无法在站点级别覆盖。由于您要添加处理程序,因此我假设需要解锁的是处理程序配置。你应该可以从 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
希望我参加聚会还不算太晚。我以前有同样的问题。
此问题最可能的原因是您没有安装 IIS URL 重写模块。此模块不是标准 IIS 安装的一部分。您必须从以下位置明确安装它:
http://www.iis.net/downloads/microsoft/url-rewrite
只要安装扩展,你现在应该没问题了
确保处理程序映射 read/write 在功能委托下,如下 ScreenShot
我已按照此 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 module -->
<handlers>
<add name="iisnode" path="hello.js" verb="*" modules="iisnode" />
</handlers>
</system.webServer>
</configuration>
这是因为您在服务器级别的配置无法在站点级别覆盖。由于您要添加处理程序,因此我假设需要解锁的是处理程序配置。你应该可以从 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
希望我参加聚会还不算太晚。我以前有同样的问题。 此问题最可能的原因是您没有安装 IIS URL 重写模块。此模块不是标准 IIS 安装的一部分。您必须从以下位置明确安装它:
http://www.iis.net/downloads/microsoft/url-rewrite
只要安装扩展,你现在应该没问题了
确保处理程序映射 read/write 在功能委托下,如下 ScreenShot