'stdout message shows "Access to the path 'C:\Windows\system32\config\systemprofile' is denied" as log

I have hosted .net core application on IIS. When i am trying to browse the application, HTTP Error 502.5 - Process Failure error comes up on browser. On checking stdout logs of application, i found that error message is "Access to the path 'C:\Windows\system32\config\systemprofile' is denied"

I am trying to host this application on my local IIS.



Solution 1:[1]

This error comes because of required .net core version not installed on server. One has to be careful about version number (eg. 3.1) and then also about whether its hosting bundle or sdk or runtime. In my opinion, hosting bundle is needed when using IIS.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 nishant mahajan