Handler "iisnode" has a bad module "iisnode" in its module list when running in Visual studio and IIS Express 8
On my Windows 8.1 x64 I have installed IIS Express 8 RTM x64 and iisnode 0.2.18 x64. I am also using node v0.12
In Visual Studio settings I have checked Use 64 bit version of IIS Express.
My web.config:
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>
</system.webServer>
</configuration>
And I am getting an error "Handler "iisnode" has a bad module "iisnode" in its module list" What am I missing?
You may need to add the module in the config:
<globalModules>
<add name="iisnode" image="C:\Program Files (x86)\iisnode-express\iisnode.dll" />
</globalModules>
I basically got it to work by running IIS Express from the command line: http://www.iis.net/learn/extensions/using-iis-express/running-iis-express-from-the-command-line
@beautifulcoder I've tried that but still have the same error. The only difference I have is a full version of iisnode (so I use path C:\Program Files (x86)\iisnode\iisnode.dll), but as far as I understand it is allowed according to the installation guideline
I recommend installing the x86 express version of iisnode. I got it to work with Node.js x64 and IIS Express 8 x86
Make sure iisnode schema file is present in C:\Program Files\IIS Express\config\schema and make sure iisnode module is in both globalModules section and the modules section. C:\Program Files\IIS Express\AppServer\applicationHost.config --
This is still a problem in IIS Express 10 used to debug in VS 2017 (Version 15.4.0). I got it to work by adding all of the same iisnode directives from a windows installed IIS application.config, into the project's application.config (which affects IIS Express in VS 2015+), which are found here:
<path_to_solution_folder>/.vs/config/application.config
I searched for "iisnode" in the windows installed IIS application.config found here:
C:\Windows\System32\inetsrv\config
and copied those "iisnode" tags into the appropiate nodes for the project's application.config, shown below:
(I have included the structure of "where" I added the iisnode tags, and the ... represents there is a large space in between)
<configuration>
...
<configSections>
...
<sectionGroup name="system.webServer">
...
<section name="iisnode" />
</sectionGroup>
</configSections>
...
<globalModules>
...
<add name="iisnode" image="%programfiles%\iisnode\iisnode.dll" />
</globalModules>
...
<configSections>
<sectionGroup name="system.webServer">
...
<section name="iisnode" />
</sectionGroup>
</configSections>
...
<tracing>
<traceProviderDefinitions>
<add name="WWW Server" guid="{someGuidThatIsntThisText}">
<areas>
...
<add name="iisnode" value="32768" />
</areas>
</add>
</traceProviderDefinitions>
</tracing>
...
<location path="" overrideMode="Allow">
<system.webServer>
<modules>
...
<add name="iisnode" />
</modules>
...
</system.webServer>
</location >
</configuration>