DEV Community

Sanjeevi Subramani
Sanjeevi Subramani

Posted on • Originally published at lkgforit.com on

Azure App Service - Dotnetcore app - 500 Error - IIS was not able to access the webconfig file

When we get error: IIS was not able to access the web.config file for the Web site or application. Ensure that the NTFS permissions for the web.config file are correct on accessing an Azure app service endpoint which is hosted with dotnet core Webapp or API, you can follow this article to troubleshoot it.

Sometimes we will get following error also based on the place your code fails: 500.30

Open Advanced tools menu in the App service left menu under development tools - as shown in below image.

image.png

Click on Go link - as highlighted in below image.

image.png

In the new window opened - click on Debug console and then select CMD as highlighted in below image.

image.png

Click on site folder -> then wwwroot folder. Edit the web.config file inside the folder as shown in image below.

image.png

Copy the highlighted text in image below. (which in our case is .\SampleApp.dll)

image.png

Then type in the following command in the cmd prompt shown below:

dotnet .\SampleApp.dll

Enter fullscreen mode Exit fullscreen mode

image.png

Then you will see the errors occurred on the app start in the console.

If there are no errors, then it will show this message:

image.png

Top comments (0)