tjanczuk / iisnode

Hosting node.js applications in IIS on Windows
Other
1.85k stars 587 forks source link

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

Open marvinatorrr opened 7 years ago

marvinatorrr commented 7 years ago

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 commented 7 years ago

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

Easy.

AngelsProjects commented 5 years ago

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

ruchit07 commented 5 years ago

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

  1. Set website folder structure as below,
  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 `

             <action type="Rewrite" url="server.js"/>
        </rule>`

Hope this would help you.

hejunv587 commented 5 years ago

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

OZZlE commented 1 year ago

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

jared-sanders commented 5 months ago

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;"
karunakerreddyv commented 2 months ago

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

Easy.

thx, it worked