繁体   English   中英

如何更正 IISNode HTTP 500 substatus 1002 进程请求错误

[英]How to correct IISNode HTTP 500 substatus 1002 process request error

尝试使用 IISNode 在 Windows IIS 中托管应用程序时出现以下错误。

iisnode 在处理请求时遇到错误。

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:

应用程序抛出了一个未捕获的异常并被终止:

错误:EPERM:不允许操作,lstat 'C:\\path\\to\\project'

在 Object.fs.lstatSync (fs.js:893:18)
在 Object.realpathSync (fs.js:1527:21)
在 toRealPath (module.js:132:13)
在 Function.Module._findPath (module.js:180:22)
在 Function.Module._resolveFilename (module.js:470:25)
在 Function.Module._load (module.js:420:25)
在 Module.require (module.js:500:17)
在要求(内部/module.js:20:19)
在对象。 (C:\\Program Files\\iisnode\\interceptor.js:210:1)
在 Module._compile (module.js:573:32)

我曾尝试更改服务器以侦听process.env.PORT ,但仍有问题。

还有设置

<rewrite>
  <rules>
    <rule name="sendToNode">
      <match url="/*" />
      <action type="Rewrite" url="server.js" />
    </rule>
  </rules>
</rewrite>

<iisnode 
  nodeProcessCommandLine="&quot;%programfiles%\nodejs\node.exe&quot;"
  interceptor="&quot;%programfiles%\iisnode\interceptor.js&quot;"
/>

web.config文件中。

运行npm cache clear --force解决了这个问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM