I have recently upgraded my .Netcore webapi from 2.2 to 3.1 and deployed to azure app services.
Since then I got the below issue. I have reverted the release but still getting the same error.
I found few solutions for IIS but nothing for Azure app services .How to fix this?

- 75
- 1
- 10
-
Did you check event viewer ? – Hameed Syed Aug 14 '21 at 04:42
-
Event viewer is not available in Azure app services. – mohan Aug 16 '21 at 04:48
-
If my reply is helpful, please accept it as answer(click on the mark option beside the reply to toggle it from greyed out to fill in.), see https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – Jason Pan Aug 19 '21 at 01:35
1 Answers
[NEWEST]
Solution:
Reduce the version of Microsoft.Extensions.Configuration.Abstractions
to 3.1.17
or 3.1.16
.
Troubleshooting:
Try to find
Microsoft.Extensions.Configuration.Abstractions
onscm
site.I guess it don't include
Microsoft.Extensions.Configuration.Abstractions
package when deploy, so try to use below code in.csproj
file. But it failed.I try to find the reason on
scm
site, and I find it. On azure,.net core 3.1
just support the version ofMicrosoft.Extensions.Configuration.Abstractions
are3.1.17
and3.1.16
.
[PREVIOUS] The way to find the error logs
Judging from the error message, your webapp did not start. To solve the problem, we can only locate the error by querying the log.
You have the following two solutions to solve the problem. View the log:
Prerequisite: If you have successfully deployed the project before, please log in to the scm site to clean up all the files in the original wwwroot
folder.
Plan 1:
Find the web.config
file in the wwwroot
folder and set stdoutLogEnabled="true"
.
You can refer to the following posts and github issues.
Azure Web App - Python: can't open file 'manage.py': [Errno 0] No error
How to enable stdoutLogEnabled=true when site is deployed with Run From Package
After add the settings in web.config
, we can check the logs.
Plan 2:
Follow below picture, check Application Event Logs
.
You also can refer my answer to Collect .NET Profiler Trace
(Azure - Unhandled Exception: System.IO.FileNotFoundException).
After find the error, you can solve it quickly. If you also have some problem, you can create a new project without any sensitive info for us to reproduce your issues.

- 3,939
- 2
- 21
- 31

- 15,263
- 1
- 14
- 29
-
Thanks for the help ! I have enabled stdoutLogEnabled="true" in web.config .It stdoutLog it shows the following error . Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutralThe located assembly's manifest definition does not match the assembly reference. IF I deploy directly from local visual studio to app services it's good and service is up .but If I deploy through yaml(CI/CD) there the issue . Can you please suggest on this? – mohan Aug 18 '21 at 20:08
-
@mohan I find the reason, I will update the answer, if it helps you, you can accept it as answer, thanks. – Jason Pan Aug 19 '21 at 01:21
-
Thanks much for your help and support !unfortunately this didn't work though I upgraded to 3.1.17 .Here is the error Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=3.1.17.0, The system cannot find the file specified. File name: 'Microsoft.Extensions.Configuration.Abstractions, Version=3.1.17.0 ,but dll is available in the www root folder – mohan Aug 19 '21 at 20:35
-
@mohan okey,please follow the code I provided in csproj, and also upgrade 3.1.17, and try again. – Jason Pan Aug 19 '21 at 22:14
-
@mohan if also failed, pls try to copy and paste the dll from the folder, you can find the path in scm site. If it works, pls use ItemGroup tag. https://stackoverflow.com/questions/67181866/azure-functions-dont-publish-appsettings-prod-json-file/67206074#67206074 . Try to modify csproj file, include.dll file when build and deploy. – Jason Pan Aug 19 '21 at 22:24
-
Thanks for all your help @Jason Pan ! much appreciated. I have ended up by creating the new app service. It's working fine. – mohan Aug 22 '21 at 22:33