azureazure-webapps

Azure WebApp (Windows) - You do not have permission to view this directory or page


I have simple NodeJS app created by npx express-generator myExpressApp --view ejs following this instruction - https://learn.microsoft.com/en-us/azure/app-service/quickstart-nodejs?tabs=linux&pivots=development-environment-vscode#create-your-nodejs-application

I use GitHub actions task azure/webapps-deploy@v3 and it's deployed to Linux-based WebApp as a charm
However if I deploy to Windows-based WebApp I'm getting You do not have permission to view this directory or page. on the WebApp's page
Deploy logs in Windows-based WebApp are all good
I tried zip and msdeploy for type in azure/webapps-deploy@v3, result is the same
How it could be fixed?


Solution

  • Even I am getting same error when I deployed the app using GitHub actions.

    In this MSDoc it is clearly mentioned the requirement of web.config file while running the app in Windows.

    If you are deploying from VSCode, then add SCM_DO_BUILD_DURING_DEPLOYMENT Application setting with value true.

    VSCode:

    enter image description here

    Portal:

    enter image description here

    enter image description here

    Output:

    enter image description here