I am getting this error when my App Service starts on Azure:
An error occurred while starting the application.
I have not been able to find any relevant errors in the event logs.
How can I debug this?
I am getting this error when my App Service starts on Azure:
An error occurred while starting the application.
I have not been able to find any relevant errors in the event logs.
How can I debug this?
I found this page very helpful:
In particular, there is a tool in Azure called Kudu Services (Under Development Tools/Advanced Tools) which lets you open a command prompt for your site, and then run dotnet your.dll
This will show you the exact error message that is occurring as if you were running it on your own localhost with all output.
Steps:
DEBUG CONSOLE (Top Menu), then CMDCD siteCD wwwrootDIR to list contents. Find your dll in the list to ensure you are in the right location.DOTNET your.dllThe site will then start up, or fail to start. If it fails, it will show the relevant messages so you can debug.