Forum Discussion
You do not have permission to view this directory or page while deploying Web APP in App service
Hello,
I am trying to deploy a web app using azure pipeline, the release pipeline is run successfully and the application URL is also generated but when I try to access the app URL I am getting the below error
You do not have permission to view this directory or page
I have googled about this quite a bit but all I can mainly see is that your application should have an Index file or webconfig file. I am not a developer and I took this with the developer and he has confirmed that, he is able to deploy it manually. I am not quite sure what more can be done on this. I have also seen that there is a note that is prompted during the deployment as below, I wonder if this is related
NOTE: Run From Package makes wwwroot read-only, so you will receive an error when writing files to this directory.
Can anyone advise on this
Thanks
1 Reply
Please check at the following:
- Missing or Misplaced Startup File
Azure App Service expects a default file in the wwwroot directory. If your app doesn’t include one (or it’s not deployed correctly), you’ll get the “You do not have permission…” message.
- Check your build artifacts: Make sure your pipeline is publishing the correct files (e.g., index.html, web.config, or compiled DLLs for .NET apps).
- Verify the folder structure: Use the Kudu Console to inspect the site/wwwroot directory. If it’s empty or missing key files, that’s your culprit.
- Run From Package Mode
That note you saw—“Run From Package makes wwwroot read-only”—is important. It means your app is deployed as a ZIP package, and Azure mounts it as read-only. That’s fine, but:
- Your app must be fully self-contained in the package.
- You can’t write to wwwroot at runtime—so if your app tries to do that, it will fail.
If your developer can deploy manually but the pipeline fails, it’s likely the pipeline isn’t packaging or publishing the app correctly.
- Enable Detailed Error Messages
To get more insight:
- Go to App Service > Settings > App Service logs
- Enable Detailed Error Messages and Failed Request Tracing
- Then try accessing the app again—Azure will show a more specific error page.
- Double-Check App Type and Runtime
If you’re deploying a .NET app, make sure the App Service runtime stack matches your app (e.g., .NET 6, .NET Framework, Node.js, etc.). A mismatch can cause silent failures.