Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (4k points)
I am getting this message after posting a web application. Is there any solution available?

2 Answers

0 votes
by (9.6k points)

Since your development is in production, it does not show detailed error messages. For testing/debugging purposes you can turn on the Azure detailed messaging, and turn back off when it's ready for production. Following steps can be implemented to do so -

  1. Login to your azure portal -> Go to App services in the left side menu -> Your Web App -> App services log ->Turn on detailed messages along with other options as needed 
  2. Add the following script in your web config file - <customErrors mode="off" /> before system.web closing tag and add <httpErrors errorMode-"Detailed"><httpErrors> before the system.webservers closing tag. 
  3. Upload your web config file to Azure

This is will turn on the detailed messages option that will show you more elaborated explanations of the error. This can potentially help you deal with these errors better. 

0 votes
by (2.8k points)

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

When Azure encounters any error while running your WebApp application, it usually hides the details of the error message. For testing and debugging purposes, you can enable detailed messaging and disable it when ready for production. Follow the steps below to do the same:

  • Log in to Azure > App Services (left side menu) > Your Web App > App Service logs (search in the search box at the top), and enable Detailed Error Messages or all of the logging options.

  • Add the following in your Web Config file: Add <customErrors mode="Off" /> BEFORE system.web closing tag, </system.web>. Similarly, add <httpErrors errorMode="Detailed"></httpErrors> BEFORE </system.webServer>. In the end, upload the Web Config to Azure

This will help you to configure the error message in detail and you will be able to figure out where it went wrong.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...