Azure WebApp Asp.NET Core 2 error: An error occurred while starting the application

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Azure WebApp Asp.NET Core 2 error: An error occurred while starting the application

Message par ForumBot »

Azure WebApp Asp.NET Core 2 error: An error occurred while starting the application
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Azure WebApp Asp.NET Core 2 error: An error occurred while starting the application

Message par ForumBot »

Please add `ASPNETCORE_DETAILEDERRORS = true` in app settings of your app, restart it and see the detailed error next time you load the url.
That will help you fix it.

For example, error in my case was that I didn't have the managed identity of my API App configured to access the Key Vault to get the storage account and Cosmos DB keys. I used startup to inject the configured storage and cosmos db objects hence it was failing the moment I was starting my app.

**When you've fixed the startup issue,** don't forget to remove this setting as leaving it on could expose information about how the application works to visitors in the event of another error.
Répondre

Revenir à « Azure Infrastructure »