-
Notifications
You must be signed in to change notification settings - Fork 581
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. - HResult 0x2 - HTTP status: 500 #282
Comments
The ETW traces suggest the node.exe process that iisnode creates to serve your application is immediately terminating ( I suggest a few experiments:
|
Also, do any of the node.js samples included with iisnode work? |
Thanks for the very quick response! So I've uninstalled node v0.10.10 and installed v0.8.25, uninstalled iisnode v0.2.6 and installed v0.2.7. I've changed my testfile to this code: var http = require('http');
var fs = require('fs');
process.on('uncaughtException', function (err) {
fs.writeFile("test.txt", err, "utf8");
})
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello, world! [helloworld sample]');
}).listen(process.env.PORT || 8888); I think that's the right way of logging an There are no events in the event log, and from the samples I've tried 3 (helloworld, defaultdocument and express) all returned the same error. |
Can you put a simple *.txt file next to your server.js file and try navigating to it from the browser? Let's just make sure the IIS app is set up correctly. Please change your Can you add a What is the configuration of the IIS application pool that runs your application? Are you doing anything non-default, e.g. custom identity, any other non-default values? |
I can browse the text file fine, it shows the content in the browser when I navigate to it. I've changed writeFile to writeFileSync but still nothing is written to file. The var http = require('http');
var fs = require('fs');
process.on('uncaughtException', function (err) {
fs.writeFileSync("test.txt", err, "utf8");
})
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello, world! [helloworld sample]');
}).listen(process.env.PORT || 8888);
console.log('finished'); These are the settings of the application pool, it was created by Plesk when the domain name was created in Plesk:
Advanced Settings (I'm only including the ones that are bold)
So to answer your question, the custom identity is indeed non-default. Could that be it? |
I've been trying some things with the application pool and its identity, as I had a feeling the problem could be related. I've currently set the application pool to the DefaultAppPool and set the identity to NETWORK SERVICE. After giving NETWORK SERVICE the correct modify rights. I now have an error message:
I'm guessing it is recommended that you run your web application under the DefaultAppPool with the ApplicationPoolIdentity as Identity? However if I tried to set the correct right by adding modify rights to I've found this Server Fault thread but after running the
|
I've got it to work with the DefaultAppPool and setting the identity to NETWORK SERVICE. The error above I solved by using the solution you proposed in issue #247. The only question that remains now is, is it bad to run my application under the NETWORK SERVICE identity? I'm guessing the problem is that the DefaultAppPool is configured in a certain way and the app pools that Plesk creates do not have the same configuration as the DefaultAppPool? |
+1 |
simple, give access-control-allow-origin in node server |
I can't seem to get iisnode working on my system, my specs:
The "Enable 32-bit applications" boolean is set to true on the application pool, which runs in Integrated mode (I've tried Classic, does not change anything) and on .Net framework version 4.
My application is the 'Hello world' application that is mentioned in the howtos of iisnode. The code:
If I change 'process.env.PORT' to '8000' and run the file via the command 'node hello.js', then the page works fine. I can browse it via localhost:8000. I've looked at the etw traces but can't make anything of it. I've also tried to log any exceptions in my node file by catching the exception and writing it to a file but no file is created.
the etw traces look like this:
As I didn't find any 'next steps' to take, any help is greatly appreciated.
The text was updated successfully, but these errors were encountered: