iisnode
iisnode copied to clipboard
web.config iisnode section breaks app
Hi
When I try and add iisnode settings to my apps web.config .breaks the express app with 500 error.
even adding
Thanks
web.config:
<!-- indicates that the hello.js file is a node.js application
to be handled by the iisnode module
<iisnode promoteServerVars="AUTH_USER,AUTH_TYPE" />
-->
<handlers>
<add name="iisnode" path="server.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<!-- Don't interfere with requests for node-inspector debugging -->
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^server.js\/debug[\/]?" />
</rule>
<!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
<rule name="StaticContent">
<action type="Rewrite" url="public{REQUEST_URI}" />
</rule>
<!-- All other URLs are mapped to the Node.js application entry point -->
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True" />
</conditions>
<action type="Rewrite" url="server.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
if you remove "<iisnode promoteServerVars="AUTH_USER,AUTH_TYPE" />", does it work? Is this on Azure Websites OR IIS ?
Check your applicationHost.config file to see if <section name="iisnode" /> is present under system.webServer
Hi Thanks for response
its iis7 and yes app worked without the setting.
but ...
- Fix was to install latest iisnode
- configure the web site with windows only authentication and ensure the site can serve a index.htm page externally (local domain) without login prompt.
- restart iis
now getting the variable in my node app the is what I need
Man Thanks