I have 3 resource groups in Azure, with each 2 Azure Web apps (one of them in NorthEurope, the other in WestEurope) that sit behind a traffic manager. All of this is deployed through Azure ARM templates (the same templates for all Web Apps):
Visually:
DEV (Resource group)
Traffic Manager
WebApp in NorthEurope
WebApp in WestEurope
DEV1 (Resource group)
Traffic Manager
WebApp in NorthEurope
WebApp in WestEurope
PROD (Resource group)
Traffic Manager
WebApp in NorthEurope
WebApp in WestEurope
I have deployed the exact same web application to each of those 6 WebApps (so, code, configuration and settings should all be the same).
All but one of the web apps are running perfectly fine. One of them (WebApp in WestEurope in Prod) fails with the following error message:
Could not load file or assembly 'GeoUK.OSTN' or one of its dependencies.
Could not find or load a specific file. (Exception from HRESULT: 0x80131621)
The assembly was added through NuGet.
Things I have tried / checked:
I'm not sure how else I can troubleshoot this issue. It just seems to randomly fail on that WebApp. Any pointers on what to check next would be greatly appreciated.
Complete StackTrace:
[FileLoadException: Could not load file or assembly 'GeoUK.OSTN' or one of its dependencies. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +36
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +21
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38
[ConfigurationErrorsException: Could not load file or assembly 'GeoUK.OSTN' or one of its dependencies. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +738
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +217
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +92
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +290
System.Web.Compilation.BuildManager.ExecutePreAppStart() +157
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +531
[HttpException (0x80004005): Could not load file or assembly 'GeoUK.OSTN' or one of its dependencies. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9947380
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261
User contributions licensed under CC BY-SA 3.0