繁体   English   中英

Angular 到 IIS 服务器的通用部署给出错误

[英]Angular Universal Deployment to IIS server giving error

我有一个 angular 通用项目。 成功生成生产构建 dist 文件夹后。 将内容放入服务器根文件夹后,它显示以下错误 -

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 node.exe process has not written any information to stderr or iisnode was unable to capture this information. Frequent reason is that the iisnode module is unable to create a log file to capture stdout and stderr output from node.exe. Please check that the identity of the IIS application pool running the node.js application has read and write access permissions to the directory on the server where the node.js application is located. Alternatively you can disable logging by setting system.webServer/iisnode/@loggingEnabled element of web.config to 'false'.

我的main.jsweb.config文件位于带有 dist 文件夹的项目目录下,我在根文件夹中授予所有用户完全控制权限,但仍然没有运气。

任何帮助将不胜感激。 提前致谢。

  1. 请确保授予 IIS_IUSRS 组对该文件夹的写入权限

  2. Go 进入高级设置菜单并在 Process Model -> Identity 下将用户帐户更改为已经具有写入权限的用户。

此链接提供了在 IIS 中设置节点 JS 的步骤:

https://www.hanselman.com/blog/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx

可能你需要依次检查static content feature windows features on or off/IIS/world wide web service/http common feature/static content是否已经安装。

暂无
暂无

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

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