ErrorCode: 500; Error: Internal Server Error

After deploying the installable cloud app to IIS, you received the following error when accessing the application.

ERROR [12428] Failed to download the config file http://x.x.x.x:yyyy/zzz/apprun.json; ErrorCode: 500; Error: Internal Server Error. 

Cause:

  1. The .NET Core Hosting Bundle is not installed on the IIS server.

    Solution:

    Download and install the .NET Core Hosting Bundle to the IIS server.

    The version of hosting bundle should match with the version of .NET framework used by Web APIs. For PowerServer 2022 R2, download and install .NET Core Hosting Bundle 6.0.

  2. The IIS_IUSRS group does not have the appropriate permissions for the files or the directories of IIS.

    Solution:

    Follow instructions in this web page.

If the above solution does not solve the issue, you should verify that IIS itself is working normally. For example, you can access the IIS default web site, if the IIS welcome page can display, it indicates IIS is working; if the welcome page cannot display, you should refer to the IIS troubleshooting guide to fix the error first, for example, refer to the following Microsoft documentation for more information about the 500.19 error: https://docs.microsoft.com/troubleshoot/developer/webapps/iis/health-diagnostic-performance/http-error-500-19-webpage.