2
votes

Hey StackOverflow geniuses! Long time reader, first time writer here :) I'm trying to deploy a simple .Net Core MVC app to Azure, but I'm getting the good ol' "You do not have permission to view this directory or page" when I browse the site.

I created a basic mvc app with the dotnet new mvc (no other changes) and deployed it with the VS Code Azure App Service extension. It runs locally and everything seems fine during the deployment process, but I still get that error. Now I've tried creating the same app in Visual Studio 2017 using the mvc template. And when I deploy that it seems to work fine.

I'd like to use VS Code exclusively. If you guys have any insights on what it's doing differently and how I might be able to fix it, I'd appreciate it.

1

1 Answers

0
votes

I'm trying to deploy a simple .Net Core MVC app to Azure

How did you do that?

If you do a dotnet publish from your VS code terminal or from any command line it will create a publish folder under your \bin\Debug\netcoreapp2.2\publish\ you need to right click on this folder in your VS code and click the "Deploy to WebApp..." after this it works fine for me. I assume you were getting the error because you deployed a different folder.

If this does not help you can turn on the diagnostics logs, like they do it here: Azure website message "You do not have permission to view this directory or page.". What to do?