簡體   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