Azure website message “You do not have permission to view this directory or page.”. What to do?

前端 未结 10 1865
陌清茗
陌清茗 2020-11-28 11:54

After I published an ASP.NET Core app to Azure from Visual Studio 2017 I am getting this message when I click on the app url:

It was working fine before. Is

相关标签:
10条回答
  • 2020-11-28 12:20

    From the error description, it is not very clear about what went wrong here.

    You may check whether the deployed files are available or not using Kudu Console.

    Also, make sure that your startup file (For ex: index.htm) is added to the default documents section.

    I would suggest you refer Enable diagnostics logging for web apps in Azure App Service and Troubleshoot ASP.NET Core on Azure App Service to check the complete error details and root cause.

    0 讨论(0)
  • 2020-11-28 12:20

    In fact , you need to upload your index.php file direct to wwwroot (inside "site" foler)

    0 讨论(0)
  • 2020-11-28 12:21

    To turn errors on on production I had to set the ASPNETCORE_ENVIRONMENT environment variable to 'Development' which can be found in your app service here:

    0 讨论(0)
  • 2020-11-28 12:21

    Some of the answers on here are more generalized, which I consider to be better overall, but if you are working with Azure Pipelines, I do know that a common scenario in deploying an Azure Web App is that the pipeline simply chooses the incorrect deployment method for the pipeline task. In most basic cases for an IIS web app, e.g. ASP.NET, you will want to use WebDeploy. Simply set the parameters below as such:

    UseWebDeploy: true
    DeploymentType: 'webDeploy'
    

    See the task reference for more details: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment

    0 讨论(0)
  • 2020-11-28 12:29

    From my experience, if your login user ID under Azure Active Directory (AAD), you have to modify in Settings:

    • Authentication / Authorization
    • App Service Authentication, "ON" =>> choose: Log in With Azure Active Directory
    • Select 'ActivityProvider', base on your purpose. In my case, I'm using AAD.
    • Configured (Express: Existing APP)
    • Manage Azure Active Directory: Manage Permission & Manage Application

    For Manage Permission ==>> Add, In Delegate Permission, choose: Sign in and read user profile and refresh your browser to login again

    0 讨论(0)
  • 2020-11-28 12:30
    • The fist thing you should do is actually go and check the folders if your war got unpacked inside the webapps folder. for that if your web url is "xyz.azurewebsites.net" then try to open xyz.scm.azurewebsites.net. This should redirect you to KUDU interface where you can see few tabs. From those tabs select Debug Console and then select CMD from the drop down. This should give you a folder structure.Now Go to site->wwwroot->webapps . There check if your war got unpacked.
    • If not then try restarting the web app and see id this does the trick. If while creating your app service plan you have selected the Standard pricing tier, change it to premium
    • Last but not the list you can enable logging for you app. Then go to Monitoring-> Diagnostics logs . Turn those setting on. Then select Log streaming(Just below Diagnostics logs).

    Hope this help.

    0 讨论(0)
提交回复
热议问题