【发布时间】:2017-06-14 09:04:06
【问题描述】:
我正在尝试使用 IISNode 模块将 node.js 应用程序部署到托管在 Windows 2008 机器上的 IIS 7.0。我有以下 web.config 文件 -
<configuration>
<system.webServer>
<webSocket enabled="false" />
<handlers>
<add name="iisnode" path="build/index.js" verb="*" modules="iisnode"/>
</handlers>
<rewrite>
<rules>
<!-- Do not interfere with requests for node-inspector debugging -->
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^build\/server.js\/debug[\/]?" />
</rule>
<rule name="StaticContent">
<action type="Rewrite" url="public{REQUEST_URI}"/>
</rule>
<!-- All other URLs are mapped to the node.js site entry point -->
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
</conditions>
<action type="Rewrite" url="build/index.js"/>
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<hiddenSegments>
<remove segment="bin"/>
</hiddenSegments>
</requestFiltering>
</security>
<httpErrors existingResponse="PassThrough" /></system.webServer></configuration>
当我导航到该站点时,它给出了一个 HTTP 错误 500.19 内部服务器错误,抱怨 web.config 无效。这个确切的配置在 azure wep 应用程序上运行没有任何问题。我还安装了 Rewrite 模块。
如果有人遇到此问题并提供任何帮助,我们将不胜感激。
非常感谢。
已编辑 - 问题出在以下行 -
<webSocket enabled="false" />
删除解决了问题。但是在尝试访问该站点时出现以下错误 -
iisnode 无法在 node.exe 进程终止之前建立命名管道连接
【问题讨论】: