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

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.



{tocify} $title={Table of Contents}

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 the following error also based on the place your code fails: 500.30


Troubleshooting Steps:

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



Click on Go link - as highlighted in below image.



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



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



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





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

dotnet .\SampleApp.dll




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

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



👌👍🙌


Follow my YouTube Channel

https://www.youtube.com/@lkgforit


Post a Comment

Previous Post Next Post

postad

post ad 2