I deploy a web app to Azure App Service using zip-deploy:
dotnet build /nologo /p:PublishProfile=Release /p:PackageLocation="c:\Repos\world\world" /p:OutDir="c:\Repos\world\world" /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /maxcpucount:1 /p:platform="Any CPU" /p:configuration="Release"
az webapp deployment source config-zip --resource-group <resource-group> --name <app-name> --src world.zip
But the app does not start or is not executed properly, leading to the following error when accessing the application url:
You do not have permission to view this directory or page.
I tried using git-deploy and it works and by going to the URL I see
Hello, world!
I put all the code on GitHub for reference: https://github.com/fnbk/world
More details:
- It is a very simple ASP.NET Core Web App with only one root route
- .NET core 2.2
- adding the variable WEBSITE_RUN_FROM_PACKAGE at Application Settings to
1
also did not work