Fixing the “500.32 ANCM Failed to Load DLL” Error in Azure App Service
A web application that suddenly returns a startup error can be frustrating, especially when everything works perfectly on a local machine. One common issue in ASP.NET Core deployments on Azure App Service is the 500.32 ANCM Failed to Load DLL error. The good news is that the fix is usually simple once the real cause is identified.
Issue
After deploying an ASP.NET Core application to Azure App Service, the website failed to start and displayed the error:
500.32 ANCM Failed to Load DLL
This error appears before the application is fully launched, meaning the ASP.NET Core Module (ANCM) cannot load the application correctly.
Cause
The problem was caused by a mismatch between the application build architecture and the Azure App Service platform configuration.
For example:
- The application was published for 64-bit
- The Azure App Service was configured to run in 32-bit mode
Because of this mismatch, Azure could not load the required DLL files during startup.
Resolution
The fix was to update the Platform setting in Azure App Service, so it matched the application deployment target.
Steps:
- Open Azure App Service
- Go to Configuration
- Open General Settings
- Change the platform from 32-bit to 64-bit (or match the published runtime)
- Restart the application
After updating the platform setting, the application started successfully without code changes.
Takeaway
When troubleshooting ASP.NET Core startup errors in Azure, always verify that the published runtime and App Service platform architecture match. It is a small setting, but it can completely prevent an application from starting.
Comments