iisnode icon indicating copy to clipboard operation
iisnode copied to clipboard

HRESULT: 0x2 HTTP status: 500 HTTP subStatus: 1002 HTTP reason: Internal Server Error

Open marvinatorrr opened this issue 9 years ago • 7 comments

yoyoyo I got this error when I try and run the dante example. I ran setup.bat as admin and ran npm install. Browsed the dante website and clicked on server-socketio.js and I get this error:

HRESULT: 0x2 HTTP status: 500 HTTP subStatus: 1002 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: EPERM: operation not permitted, lstat 'C:\Users\Van' at Error (native) at Object.fs.lstatSync (fs.js:982:18) at Object.realpathSync (fs.js:1662:21) at toRealPath (module.js:133:13) at Function.Module._findPath (module.js:181:22) at Function.Module._resolveFilename (module.js:467:25) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Program Files\iisnode\interceptor.js:210:1)

I have already given the dante folder and iisnode folder full control permissions for IUSR and IIS_IUSRS.

marvinatorrr avatar Nov 18 '16 06:11 marvinatorrr

Solved by giving full control to IIS_IUSRS and IUSR at C:\Users\Van

Easy.

marvinatorrr avatar Nov 18 '16 07:11 marvinatorrr

I have the same problem and giving full control doesn't solve my problem.

AngelsProjects avatar Jan 31 '19 22:01 AngelsProjects

I was facing the same issue. I resolved it by taking below multiple actions.

  1. Set website folder structure as below,
  • angular_node_app (root folder + gave full access to IIS_IUSRS)
    • dist
      • client
    • node_modules
    • server
    • package.json
    • server.js
    • web.config
  1. put package.json on root folder and install node_modules.

  2. Install iisnode (iisnode-full-v0.2.21-x86.msi) from https://github.com/tjanczuk/iisnode/releases on production server.

  3. update web.config file with below code <handlers> <add name="iisnode" path="server.js" verb="*" modules="iisnode"/> </handlers> <rule name="DynamicContent"> <match url="/*" /> <action type="Rewrite" url="server.js"/> </rule>

Hope this would help you.

ruchit07 avatar Feb 27 '19 10:02 ruchit07

@AngelsProjects so do you fix it finnally? could you tell me how?

hejunv587 avatar Mar 15 '19 04:03 hejunv587

node.js must run on the port it receives from IISNode eg process.env.PORT || process.env.port

OZZlE avatar May 11 '23 11:05 OZZlE

I resolved this by updating my web.config's interceptor path to use x64.

interceptor="&quot;%programfiles%\iisnode\interceptor.js&quot;"

Changed to:

interceptor="&quot;C:\Program Files\iisnode\interceptor.js&quot;"

jared-sanders avatar Apr 11 '24 14:04 jared-sanders

Solved by giving full control to IIS_IUSRS and IUSR at C:\Users\Van

Easy.

thx, it worked

karunakerreddyv avatar Jul 04 '24 12:07 karunakerreddyv