We are using App Plans to run web apps (Windows). Lately, some of our apps (randomly) crashes with a message similar to the one below. It can be deployed for a short while or days, there is no discernable pattern that we can think of.
We are using .net framework (not core) Mvc 5
System.Configuration.ConfigurationErrorsException Could not load file or assembly 'Microsoft.AspNet.Identity.EntityFramework' or one of its dependencies. The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020) (D:\home\site\SiteName\web.config line 81)).
This dll (and others) is found most of the time, so this is not a problem with our build, and if it is a problem with our code, it's an obscure one.
We also will see
"Cannot create/shadow copy 'Authy.Net, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null' when that file already exists. (D:\home\site\SiteName\web.config line 81
The variations are mainly about which file/dll/lib it has issues loading. When this happens, a workaround we found was to scale up the app plan, so we get new VM provisioned.
I'm not quite sure what to look at here, maybe it is failing to be deployed when a VM is changed, or maybe it restarts and the first process fails to end properly?
Does anyone have any suggestions? Did anyone deal with a similar issue in the past?
User contributions licensed under CC BY-SA 3.0