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

rohith v 0 Reputation points
2024-01-12T04:57:51.06+00:00

We have deployed the app service using azure pipelines and post deployment we see this issue, as there are multiple slots in one app service "testing" is the second deployment slot which we deployed.

Please help us with the existing issue would be greatful.

Thanks.
User's image

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

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 22,181 Reputation points
    2024-01-12T11:25:57.6+00:00

    @rohith v We appreciate your contact. This kind of error often occurs when there is a problem in the pipeline after deployment. To identify the source of the problem, please follow Hafiz's answer here to turn on detailed Logging in the App Service:

    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.

    If you are deploying ASP.NET core to app service through azure pipelines, you may check to see if web.config is in the build files else you can add the web.config file. This should fix the issue.

    <?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>
    
    
    

    Let us know if further query or issue remains.

    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.