. Advertisement .
..3..
. Advertisement .
..4..
I get an error
You do not have permission to view this directory or page
when trying to publish an ASP.NET Core app to Azure from Visual Studio 2017. How to fix the: ”you do not have permission to view this directory or page” error? Please give me some advice.
The cause:
This error indicates that Azure got an error while it was running your web application. It has not shown any meaningful error warnings since it was produced.
Solution:
You can test or debug by using Azure detailed messages, and then turn it back on when it readys to produce. These steps will help you to do this.
Your Web App
> App service logs (if you don’t find it, you can use search box at the top), then switch onDetailed Error Messages
or all of the logging options.Web Config
file now.<customErrors mode="Off" />
BEFORE system.web closing tags to yourWeb Config
file,</system.web>
. Also, add<httpErrors errorMode="Detailed"></httpErrors>
BEFORE</system.webServer>
. Upload theWeb Config
file to Azure, and then cross your fingers.If you execute the procedures correctly, the error messages will be displayed in detail, and you should be able to find out what went wrong from there. Best luck!
We hope this helps.