1

I'm having some issues setting up a Node.js/Node-soap service running on IIS 7, Windows Server 2008, with iisnode and node.js 0.10.20. This same setup, with the same code, is running on another server inhouse and works perfectly. The problem is that the setup process wasn't documented, and the person that put it all up is not available to migrate it to the new server. And I have no prior knowledge in Node nor IISnode.

This is the error message that gets printed:

iisnode encountered an error when processing the request.

HRESULT: 0x2 HTTP status: 500 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 last 64k of the output generated by the node.exe process to stderr is shown below:

Application has thrown an uncaught exception and is terminated: Error: %1 is not a valid Win32 application.

\node_modules\soap\node_modules\node-expat\build\Release\node_expat.node

at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (<Path to application>\node_modules\soap\node_modules\node-expat\lib\node-expat.js:4:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
  • I've added the following to my Node.js file:

Now what I have found online, tried but hasn't worked, is as follows:

  1. From this Stack Overflow question I tried two things:

    • Added this part to my Node.js file.

      <iisnode watchedFiles="*.js;node_modules\*;routes\*.js;views\*.jade" nodeProcessCommandLine="\program files\nodejs\node.exe"/>
      
    • Created a symbolic link:

      mklink /D "C:\Program Files (x86)\nodejs" "C:\Program Files\nodejs"
      

Will update if I try something else.

All help would be appreciated.

UPDATE 1: I've made sure that the Enable32-Bit Applications = False. is set in IIS, and repaired the VS 2010 x64 redist binary

1 Answer 1

1

This error message suggests the bitness of \node_modules\soap\node_modules\node-expat\build\Release\node_expat.node does not match the bitness of the IIS worker process (w3wp.exe). Since you appear to be running IIS with 64 bit worker processes (Enable 32-bit Applications == False), it may indicate that node_expat.node is a 32-bit binary?

1
  • Hi. Changing the "Enable 32-bit applications" flag was just something I saw suggested online. I've tried with it on and off, but neither work. I'm running x64 bit IISNode. This is the same set up that is running on another x64 bit machine here at the office, i.e. IISNode x64, node-soap (does only have x86 version) and Nodejs.
    – Hrafn
    Oct 14, 2013 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.