Blogginlägg

Resolve “HTTP Error 500.30 - ANCM In-Process Start Failure” when running ASP.NET Core 2.2 in Azure App Service or IIS

Av Peter Örneholm | Blogg | 9 januari 2019

I was just recently deploying a web project to Azure that I was working on during my spare time and realized It would not start, instead (after waiting almost a minute for a response) I got the following error: “HTTP Error 500.30 - ANCM In-Process Start Failure”

image

My setup was ASP.NET Core 2.2 targeting netcoreapp2.2 and running the in-process hosting model in IIS under Azure App Service (Windows).

Some time spent debugging and I found out that this was the line that broke it:

image

After looking at the sourcecode for WebHostBuilderKestrelExtensions I realized you should use .ConfigureKestrel(…) instead of .UseKestrel(…) when running using the in-process hosting mode, otherwise both Kestrel and IIS seems to fight about what server to use.

There is actually a note on that you should to this in the Migration Guide from ASP.NET Core 2.1 to 2.2, but I had missed that..

TL;DR:

If running ASP.NET Core 2.2 using the in-process hosting mode and you want to Configure Kestrel, ensure to use .ConfigureKestrel(…) instead of .UseKestrel(…) in your Program.cs.

Till inlägget