SOLVED

You do not have permission to view this directory or page.

Brass Contributor

Hello All,

 

Whenerver I use the "Archive Files" task in the Azure DevOps build pipeline, upon release, I get the following error on my azurewebsite: You do not have permission to view this directory or page.

However, when I use the Copy Files" task as a workaround, the website works just fine. The problem is that this task takes almost 10x as long as the Archive Files task. Any help will be appreciated in resolving this issue.

4 Replies

@techieg4 

Are you saying webapp, can try to check the log below:

 

Login to Azure > App Services  > Your Web App > App Service logs, turn on Detailed Error Messages or turn on all of the logging options

First, I would check my browser and admin permissions in azure and the admin portal. If all else fails you should check your admin permissions. If you are a global admin, you should only use that feature using more than one admin permission will start to lock you out of accessing site on Microsoft.
best response confirmed by techieg4 (Brass Contributor)
Solution

@techieg4 FInally resolved it by unchecking the "Prepend root folder name to archive path" checkbox (see image below), which was zipping up everything within a "build" folder and deploying it as such. So, the website could only see the "build" directory in wwwroot, which triggered the error message since browsing to the url was trying to access this folder rather than the index.html that was supposed to be at the wwwroot.. Once I unchecked that checkbox, no more zipping up in the "build" folder and zipped files get deployed in wwwroot as it should. All is well!

techiegz_0-1680753539356.png

I am using AzureResourceManagerTemplateDeployment@3 task to deploy an azure ad b2c tenant using the release pipeline.
When I was manually running the script using my local PowerShell then it was running smoothly but in release pipeline, I got the same error as yours:

sagar1203_0-1704298295011.png

Now the thing is that I tried giving every related admin rights like subscription owner and ad b2c global administrator. I wasn't able to resolve the issue. Could you please help me with this?

 

1 best response

Accepted Solutions
best response confirmed by techieg4 (Brass Contributor)
Solution

@techieg4 FInally resolved it by unchecking the "Prepend root folder name to archive path" checkbox (see image below), which was zipping up everything within a "build" folder and deploying it as such. So, the website could only see the "build" directory in wwwroot, which triggered the error message since browsing to the url was trying to access this folder rather than the index.html that was supposed to be at the wwwroot.. Once I unchecked that checkbox, no more zipping up in the "build" folder and zipped files get deployed in wwwroot as it should. All is well!

techiegz_0-1680753539356.png

View solution in original post