Infinite | Squares

Art of code and more

Issues on Using Iisnode on Windows 7


I found the issue with the Azure website. Sailsjs is actually working well. The issue is that I used Azure free tier and free tier is going idle (IIS app pool timeout) after some time if not used. This caused some errors when I tried to access it from browser (that’s when the app started again). I tried to use uptimerobot to check the site every 5 minutes so it will not go idle. I still found the website is stopped this morning.

end of update

I started to use sailsjs in my latest project. When I deployed it to Azure Web Sites, the web is not working. Sometimes I can access it, but most of the time I just can’t. So I went to install IIS and iisnode on my Windows 7 machine to test the sailsjs on IIS deployment on local dev machine. Maybe I can figure out what went wrong. But what I found is series on errors when trying to run simple iisnode example.

So the example can be accessed on http://localhost/node

Error #1. 500.19 with Error Code 0x80070021

This happened whn I tried to click on of the example on http://localhost/node page


Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault=“Deny”), or set explicitly by a location tag with overrideMode=“Deny” or the legacy allowOverride=“false”.

I spent hours trying to resolve this error. This issue suggested to Set the Handler Mappings to Read/Write. I checked and its set correctly but still no luck.

Then I fount this question which linked to this blog.

So following the answer :

  1. Open the applicationHost.config file, located here: %windir%\system32\inetsrv\config\applicationHost.config
  2. Edit the “handlers” section.
  3. Change this line:
  <section name=”handlers” overrideModeDefault=”Deny” />
  <section name=”handlers” overrideModeDefault=”Allow” />

Now its working. I can click one of the example. Lets go to helloworld

Error #2. Nodejs path issue

This happened when I tried to run Node.js app http://localhost/node/helloworld/hello.js


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.

This one is easy, I use nodist which put node.exe on non default PATH. Add this line to web.config


Error #3. 500.1000 with Error Code 0x00000005

This happened when I tried to run Node.js app http://localhost/node/helloworld/hello.js. New error.

I spent another hours on this one. I tried to install ASP, ASP.NET and .NET Extensibility Features on IIS. Then running aspnet_regiis.exe -i. But still have the error!

Any thoughts?

As for me, I will just use Linux box. It’s a shame because Azure Website scalability is a big plus!