简体   繁体   中英

Angular Universal Deployment to IIS server giving error

I have an angular universal project. After the production build dist folder was generated successfully. After putting the content in the server root folder it's displaying the following error -

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'.

My main.js and web.config file are under the project directory with the dist folder and I gave all users full control permission in the root folder but still there is no luck.

Any help will be appreciated. Thanks in advance.

  1. Please make sure the permissions to give the IIS_IUSRS group write permissions to that folder

  2. Go into the advanced settings menu and under Process Model -> Identity change the user account to a user that already has write permissions.

And this link provide the steps to set node JS in IIS:

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

Maybe you need to check whether the static content feature in turn windows features on or off/IIS/world wide web service/http common feature/static content has been installed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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