Reputation: 341
Hi I am trying run node on IIS as a subdirectory of an existing website.
https://somewebsite/node like so
And it works but when I go to a specific js file I got this message, not sure what to do.
The iisnode module is unable to start the node.exe process. Make sure the node.exe executable is available at the location specified in the system.webServer/iisnode/@nodeProcessCommandLine element of web.config. By default node.exe is expected in one of the directories listed in the PATH environment variable.
Upvotes: 10
Views: 22672
Reputation: 2035
In windows Server
first you should check environment paths
C:\> Path
remove all previous installation and uninstall nodejs from other package managers
then download 64-bit msi installer from nodejs.org / download page
then install again
and restart server
then you can Comment this line again In Web.Config
<!--
One more setting that can be modified is the path to the node.exe executable and the interceptor:
<iisnode
nodeProcessCommandLine=""%programfiles%\nodejs\node.exe""
interceptor=""%programfiles%\iisnode\interceptor.js"" />
-->
Upvotes: 0
Reputation: 11
You should consider two important points.
I recommend you read this article for setting the right path of the node on the "system.webServer/iisnode".
Upvotes: 1
Reputation: 101
By setting the values in C:\Program Files\iisnode\www\configuratio\web.config is not always fixing the issue . Please follow the below steps and try to set in IIS server level.
Select IIS server and open Configuration editor https://www.screencast.com/t/SWcy4C5m
Select the section system.webServer/iisnode and set the nodeProcessCommandLine value to node.exe full path. https://www.screencast.com/t/e8N6MFeWEueS
This fixed my issue. Hope this will be helpful to someone.
Upvotes: -1
Reputation: 15031
I had working node 6x and iisnode. When i installed node 8x for Angular 7 on my Windows 8, I got the same error as a result of rest API call as in question
For me, just needed to add the path to node.exe in the Windows environment variables and iisnode worked as before
Upvotes: 0
Reputation: 341
Added the following code in web.config file and it works!
<iisnode nodeProcessCommandLine="C:\Program Files\nodejs\node.exe" />
Upvotes: 23