Windows IIS8上的Nodejs不起作用

我使用快递的nodejs应用程序,我想在Windows IIS上承载。 在我的IIS8 nodejs正在工作。 但我得到一个错误“无法GET /节点/ paradify /服务器.js”,我把重写规则在web.config。 那么我得到了以下错误。

HTTP错误500.19 – 内部服务器错误请求的页面无法访问,因为页面的相关configuration数据无效。

我在互联网上发现。 大家build议下面的configuration,但不是在我的窗户上工作

我的web.config文件是:

<configuration> <system.webServer> <handlers> <add name="iisnode" path="server.js" verb="*" modules="iisnode" /> </handlers> <defaultDocument> <files> <add value="server.js" /> </files> </defaultDocument> <rewrite> <rules> <rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true"> <match url="^[a-zA-Z0-9_\-]+\.js\.logs\/\d+\.txt$"/> </rule> <rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true"> <match url="^server.js\/debug[\/]?" /> </rule> <rule name="StaticContent"> <action type="Rewrite" url="public{REQUEST_URI}"/> </rule> <rule name="DynamicContent"> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/> </conditions> <action type="Rewrite" url="server.js"/> </rule> </rules> </rewrite> <iisnode nodeProcessCountPerApplication="8" watchedFiles="*.js;node_modules\*;routes\*.js;views\*.html"/> </system.webServer> </configuration> 

有什么build议? 谢谢

你的configuration文件看起来有效。 所以,你必须安装iis重写扩展 ,它运作良好。