Deployed Angular web app keeps getting "You do not have permission to view this directory or page."

Oren Lev 31 Reputation points
2020-04-19T16:49:38.88+00:00

I deployed an Angular app to Azure using VS Code.
I added a web.config and made sure it was deployed, but still I keep getting 'You do not have permission to view this directory or page'.
The app works fine locally and the deployment was successful.
What am I doing wrong?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,958 questions
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 18,366 Reputation points
    2020-04-20T06:41:26.227+00:00

    Thanks for asking question! Just to confirm in your Application Settings if you have any of the files sited here in the /home/site/wwwroot folder? If not, this could be a reason for this error. If so, recommend you go to your app service, under settings Click Configuration > Path mappings > You will see "Virtual applications and directories". Your virtual path should be "/" and physical path should be "site/wwwroot/" Change your Physical path to "site/wwwroot/'appname'" "appname" should be whatever the name of your application is. Or it should be whatever folder is inside of your "dist".

    You may refer to this blog might be helpful.

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet

    6 people found this answer helpful.

0 additional answers

Sort by: Most helpful