I am trying to deploy a node.js application to IIS 7.0 hosted on Windows 2008 machine using the IISNode module. I have the following web.config file -
<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>
When I navigate to the site - it gives a HTTP Error 500.19 internal server error complaining about invalid web.config. This exact config is working on azure wep app without any issue. I've also installed the Rewrite module.
If anyone has run into this issue and any help would be greatly appreciated.
Many Thanks.
EDITED - Problem was with the following line -
<webSocket enabled="false" />
Removing that fixed the issue. But I got following error when trying to access the site -
iisnode was unable to establish named pipe connection to the node.exe process before the process terminated