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

Juan Rivero 20 Reputation points
2023-04-21T21:27:15.1133333+00:00

I deployed a Visual Studio Razor application in azure, but I am getting the following message You do not have permission to view this directory or page. previously, when I had a pay subscription The application was running, I open another subscription and the same application after deployed give me the message above. Nothing different between subscriptions configurations and the application

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

2 answers

Sort by: Most helpful
  1. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2023-04-24T08:49:26.86+00:00

    @Juan Rivero , Firstly, apologies for the delayed response from over the weekend and any inconvenience with this issue.  

    From the issue description, I understand you are leveraging the same code to deploy your WebApp from subscription to another subscription on App Service. Based on my understanding, you maybe attempting to deploy Node App on Azure App Service, please do confirm on the application framework you’re working on.

    Also, just to clarify, are you leveraging Azure App Service WebApp or Azure Static WebApps?  

    1. Typically, after deploying your Node.js code to a native Windows app in App Service, if you receive - You do not have permission to view this directory or page.  This is most likely because you don't have a web.config file. Validate which file is being displayed and check your web.config.
    2. You may review the error details from browser developer’s tool/ F12 . Once we observe the traces on the browser window, to fetch more details.
    3. You may also inspect the log files from the browser at https://<app-name>.scm.azurewebsites.net/api/logs/docker
    4. To fetch more details about the issue, you may try these:
    5. You may leverage App Service diagnostics from Azure Portal> Navigate to your App Service app in the Azure Portal. (screenshot below) In the left navigation, click on Diagnose and solve problems - Review - “Configuration and Management and “Availability and Performance”  options.

    Kindly let us know how it goes, I'll follow-up with you further. User's image

    1 person found this answer helpful.
    0 comments No comments

  2. Juan Rivero 20 Reputation points
    2023-04-25T10:15:41.78+00:00

    you can close this treat, I re published the app with vs and it worked, before I was deploying it with powershell.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.