【发布时间】:2018-11-13 09:45:22
【问题描述】:
我正在尝试使用 iisnode 在 IIS 8.5 中运行 Strapi JS REST API (strapi.io)。但我一直遇到如下 HTTP 状态 500 错误。
-
IIS_IUSRS组对该目录具有写权限(iisnode 需要); - 我使用 dotenv (.env) 文件来指定
production环境变量; - 当我通过执行
node server.js在服务器上独立运行它时,它工作正常。但不是当我通过 IIS Web 应用程序运行它时。
有没有人有一些技巧可以让它工作?任何已知的警告?
iisnode encountered an error when processing the request.
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:
(node:4792) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
(node:4792) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
【问题讨论】:
-
你找到解决这个问题的方法了吗?我有同样的错误
-
Saeid,我没让它工作。我尝试了下面提到的所有方法,但仍然没有运气。我搬到了 Digital Ocean Ubuntu droplet。