Friday, March 29, 2013

Node.js on Windows Azure - Issue With WebMatrix

I am going through some of the node.js material on Pluralsight. I am currently working on the Node in Windows and Azure modules.

I'm pretty sure that I went through the steps as described in the vids for getting WebMatrix working for an Azure website. I was able to create and publish a working node.js website to Azure, but I couldn't get it run locally (the browser showed a 500 error). I tried running the Etw.bat file that comes with iisnode, and I saw the following:

First, a whole bunch of events that said iisnode scheduled a retry of a named pipe connection to the node.exe process", followed by the event iisnode was unable to establish named pipe connection to the node.exe process. Finally, I saw iisnode request processing failed for reasons unrecognized by iisnode.

The page that showed the 500 error recommended that I make sure that the app pool user had permissions to the folders where the website was, C:\Users\Steve.Harclerode\Documents\My Web Sites. So I made sure that IIS APPPOOL\DefaultAppPool had full permissions, but I saw the same error. I even tried giving full permissions to Everyone for the folder, but that also failed.

I copied the app to a folder under a currently running iisnode application, and I was able to run it from there just by browsing to it from IIS. Unfortunately, that folder is under C:\Program Files, and I couldn't save files there unless I logged in as admin

What finally worked was to choose Add Application under IIS and select the original folder. Honestly, I'm not sure why this worked, since WebMatrix runs the program using another port, in my case 34581. I'm hoping wiser minds than mine will comment on this blog. :-)

No comments: