Azure App Service — Troubleshooting HTTP Error 500.30 — ASP.NET Core app failed to start

rachkoud
3 min readNov 9, 2021

--

You’ve just deployed your ASP.NET Core app to your Azure App Service and you’re getting this error page :

You want to view the error logs and after a bit of research, you will find this article Configuring Logging in Azure App Services where you understand that you have to configure the Azure App Service logs by adding the NuGet package Microsoft.Extensions.Logging.AzureAppServices to your project and configure it like this:

public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder
.UseStartup<Startup>()
.ConfigureLogging(logging =>
{
logging.ClearProviders();
logging.AddConsole();
logging.AddAzureWebAppDiagnostics();
});
});

You can enable the logs like this:

You will be able to try to find the exception by using the Log stream. You can see the http error code 500 but not the exception detail:

So you start searching in Stack Overflow and see many potential issues but I think it’s better to see the real exception your application is facing before trying these solutions.

There is another option to see the exception, you have to open Diagnose and solve problems > Diagnostic Tools > Application Event Logs:

Where you can see the exceptions:

You can click on any exception to see the detail of the exception:

There is another option to see this exception Availability and Performance > Web App Down:

If you scroll down on this page and click on View .NET Core Startup Failures:

You have to click the exception to see the detail:

I knew this was a potential issue but I wanted to see the exception as I’m debugging locally with Visual Studio.

```

--

--