Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Error 500.32 - ANCM Failed to Load dll after deploying a Self Contained .Net Core 3.1 App to Azure

I have an Asp .NET Core 3.1 App which is deployed to Azure App Service (West Europe/Windows based). When I use a Framework dependendant Deployment Mode, the app is starting smoothly.

But, when I try to switch to a Self Contained deployment, the App fails to start and I get an error message : HTTP Error 500.30 - ANCM In-Process Start Failure

Changing the Runtime from win-x86 to x64 didn't solve the problem.

I inspected the App Server runtime versions installed and it looks like runtimes are available (cf. screenshot below).

What am I doing wrong?

Server Installed Runtimes

like image 992
XavierAM Avatar asked Feb 05 '20 10:02

XavierAM


2 Answers

In case the above does not resolve your issue, and in case you missed it within https://github.com/dotnet/aspnetcore/issues/8980, but this solved my issue.

Per DimaSUN commented on Jun 25, 2019:

ASP.NET Core 2.2 or later: For a 64-bit (x64) self-contained deployment that uses the in-process hosting model, disable the app pool for 32-bit (x86) processes.

How to: Open Application Pool within IIS. Select the website > Advanced Settings. Set 32-bit Applications from True to False.

like image 152
Esaith Avatar answered Sep 27 '22 21:09

Esaith


For .net 5 the issue is the same I had to remove the hostingModel="inprocess" from the web.config so it read the following

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <location path="." inheritInChildApplications="false">
  <system.webServer>
   <handlers>
    <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
   </handlers>
   <aspNetCore processPath=".\Hub.WebApi.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"  />
 </system.webServer>
</location>
</configuration>
like image 35
c-sharp-and-swiftui-devni Avatar answered Sep 27 '22 20:09

c-sharp-and-swiftui-devni