iisnode在Windows 7 IIS 7.5投掷500.19错误

我已经按照这个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); 

和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> 

这是因为您在服务器级别具有在站点级别上不可覆盖的configuration。 既然你正在添加一个处理程序,我认为这是需要解锁的处理程序configuration。 你应该可以从iisconfiguration程序中做到这一点,或者你可以使用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

只要安装扩展,你应该现在就可以了