Why your ASP.NET Core 6.x web app is NOT working on the non-shared App Service Plan

I have a website which I migrated to ASP.NET Core a while ago. And recently I also upgraded it to .NET 6.x. The problem is that for some reason no matter what I do, I have been unable to get it to work on a non-shared App Service Plan:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store