我正在尝试使用 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.