Getting an error "You do not have permission to view this directory or page." when trying to browse deployed application using Azure App Service?

Evan Sanford 21 Reputation points
2021-05-16T14:50:20.017+00:00

96809-subscriptionaccesscontrolsetttings.pngI am trying to browse a deployed application using Azure App Service. A build and release pipeline was used to deploy the application. I do use an active service connection that connects to my subscription, which includes the Azure App service I am using. I did check that the pipelines I am using are allowed to use the service connection. They were existent in the usage history of the service connection. I also already checked that the deployment was successful from the Azure DevOps side and uses the correct app service.

I also have some attached screenshots with some permissions currently established for myself regarding the app service, subscription, etc.

Can you please give me an idea of what the root cause might be in this case?96915-subscriptionaccesscontrolsettting![96899-serviceconnectionsettings.png96900-appserviceaccesscontrolsettings.pngs.png]4

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
237 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Mustapha Yussif 5 Reputation points Microsoft Employee
    2023-06-21T22:09:27.25+00:00

    For anyone facing the same issue deploying ASP.NET core to app service through azure pipelines, you may check to see if web.config will is in the build files else you can add the web.config file. I had the same issue and in my case, adding the web.config fixed it for me.

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.webServer>
        <handlers>
          <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
        </handlers>
        <aspNetCore processPath="dotnet" arguments=".\YourAspNetCoreApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
      </system.webServer>
    </configuration>
    
    
    1 person found this answer helpful.
    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. singhh-msft 2,431 Reputation points
    2021-05-18T17:24:30.04+00:00

    @Evan Sanford , thank you for reaching out to us. A usual cause for this type of error after deploying through pipelines is a miss in the pipeline. To find more information about the miss, can you enable detailed Logging in the App Service by following Hafiz's answer here: Azure website message “You do not have permission to view this directory or page.”. What to do??. After this, you will get to know about the exact miss in the deployment.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


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.