Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iisnode encountered an error when processing the request. #548

Open
camnpr opened this issue Dec 9, 2016 · 13 comments
Open

iisnode encountered an error when processing the request. #548

camnpr opened this issue Dec 9, 2016 · 13 comments

Comments

@camnpr
Copy link

camnpr commented Dec 9, 2016

iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error
You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

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

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


Permissions are configured. eg: IIS_USER OK

There are two ways to fix this issue,
A) Change the Application pool to 32 bit
B) Created a symbolic link from the 32-bit path to the 64-bit one by this command.

The above settings are not successful!!!

Who can help to solve? THX

@AustinBaker
Copy link

Thanks for giving this information. I got lots of useful information from here. High-quality posts. I’ve been commenting plenty on a few blogs recently, But I hadn’t thought about my approach until you introduced it up. http://usawriters.org

@learninghabits
Copy link

Hi

I have my application hosted in Azure and getting this error from Azure.

iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1001
HTTP reason: Internal Server Error
You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

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

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

I am only hosting a site

@bilalmalik777
Copy link

@camnpr have you solved this issue?

@camnpr
Copy link
Author

camnpr commented Apr 18, 2018

@bilalMlaik i fixed this error by update system to windows server 2012 R2 (old system is windows server 2008 R2)

@kamalakkanni
Copy link

I fixed it by changing mapping path

@mseltene
Copy link

mseltene commented Jul 3, 2018

for HTTP status: 500 error is security. Right click on your folder (iis physical path) > Properties > Security
Add '\your_server_name\Users' and give Permission for Users to
Read & execute ✓
List folder contents ✓
Read ✓

Hope this works for you too.

@gcjunior
Copy link

gcjunior commented Jul 12, 2018

Windows configuration:
Windows 10 Pro
IIS Version 10.0.17

This was the error:

iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error
You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

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

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

This is how you fix it:

Go to your windows folder application -> right click -> properties -> Secutiry -> Edit -> Add -> Advanced -> Find Now -> select IIS_IUSRS option -> OK -> OK
Allow following option: Full control

Restart application on IIS and the new message will be:

Hello, world! [helloworld sample; iisnode version is 0.X.XX, node version is vX.X0.0]

@csgenius786
Copy link

@gcjunior what do you mean by windows folder application? you mean C:\windows?

@Jody-Geers
Copy link

Jody-Geers commented Apr 2, 2019

@gcjunior what do you mean by windows folder application? you mean C:\windows?

I don't think you can wack that un' on C:\windows - Try you'r IIS root directory for where you'r Node.js App is located. :)

@crisgiesed4
Copy link

Review the app.js, must be const port = process.env.PORT; otherwise the IIS will have a different port than the node.

@anilverma087
Copy link

I am having same issue , when i host sample app - create server with http

var server = http.createServer(app);

Api working fine on IIS Server

But when i create https server

var server = https.createServer(https_options, app, function (req, res) {
   res.render('./index', { title: 'Express' });
 });

Then it gives me same error :--

iisnode encountered an error when processing the request.

HRESULT: 0x6d
HTTP status: 500
HTTP subStatus: 1013
HTTP reason: Internal Server Error
You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

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

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

@sorosons
Copy link

sorosons commented Sep 1, 2022

I fix this to give full control to IIS_IURS in iss >select app>edit permission>add>find IIS_IURS>give full control this works for me

@LamNV0410
Copy link

#548 (comment)
I can't follow this step could you help me post the images or something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests