Symptom

After deploying the API Server in IIS, you can see HTTP Error 500.32 - Failed to load .NET Core host when requesting the PowerServer API in the browser, which makes the PowerServer Cloud App unable to run.


Environment 

PowerServer 2021 and later

IIS


Cause

The most common cause for this error is that the app is published for an incompatible processor architecture. If the IIS worker process is running as a 32-bit app and the app was published to target 64-bit, this error occurs.


Resolution

1) Verify the Publishing Settings for the PowerServer Web API project. 

If the Deployment Mode is Self-Contained, and the Target Runtime is win-x86, but the IIS worker process is running as a 64-bit app, then you will see this error.

2) Republish the Web API for the same processor architecture as the IIS worker process, or publish the Web API as a framework-dependent deployment.

Refer to: https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-3.1#50032-ancm-failed-to-load-dll

5
6