Iisnode encountered an error while processing the request

I am trying to test a server side angularjs application written in node js and this is the error I get when I start webmatrix

iisnode encountered an error while processing the request.

HRESULT: 0x2 HTTP status: 500 HTTP reason: Internal Server Error 

You get an HTTP 200 response because the system.webServer/iisnode/@devErrorsEnabled configuration parameter is 'True'.

In addition to the stdout and stderr logs of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The node.exe process did not write any information for stderr or iisnode was unable to capture this information. A common reason is that the iisnode module cannot create a log file to capture the output of stdout and stderr from node.exe. Verify that the IIS application pool identity that is running the node.js application has read and write permissions to the directory on the server where the node.js application Alternatively, you can disable logging by setting the system.webServer/iisnode/@loggingEnabled web.config element to false.

Does anyone know how to fix this?

+7
angularjs
source share
3 answers

Your application pool does not have sufficient permissions to write to the current folder.

  • You can edit permissions to grant IIS_IUSRS group write permissions to this folder

  • Go to the advanced settings menu and in the "Process Model" → "Identification" section, change the user account to a user who already has write permissions.

+5
source share

It looks like your iisnode cannot write your log file, possibly because it does not have write permissions. If you have access to the server, you can check the iisnode folder inside the application folder, where iisnode tries to write its default logs.

Until you get this log information, you are stuck because the 500 error you see only says that an error has occurred on the server. You need magazines to provide you with the information you need to continue.

The only alternative is to use the entire object locally and use something like node -inspector (I use grunt-node-inspector ) to debug the nodeJS code to see what happens.

+3
source share

I fixed this problem by running setupsamples.bat file. This adds permissions and other necessary configuration. For me, the path is C:\Program Files\iisnode\setupsamples.bat

0
source share

All Articles