2
PortableEngine load fails in Azure App Service
Problem reported by Lauri Kotilainen - 3/29/2019 at 5:50 AM
Resolved
We are in the process of doing a PoC port of an on-premises ASP.NET MVC 5 web app to Azure App Service. One of our dependencies is DocumentUltimate, and that's currently causing a problem. The error is similar, but not identical to other reported cases, where PortableEngine fails to load. AssemblyResolver.log contains this:

Failed resolving assembly:
 Assembly Name:
 PortableEngine, Version=2.7.5.0, Culture=neutral, PublicKeyToken=a6f3cafa178e6038
 Requesting Assembly:
 <unknown>
 Error:
 System.IO.FileLoadException: Could not load file or assembly 'PortableEngine.dll' or one of its dependencies. A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
 File name: 'PortableEngine.dll'
		at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
		at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
		at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
		at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
		at System.Reflection.Assembly.LoadFrom(String assemblyFile)
		at GleamTech.AssemblyResolver.AssemblyResolver.LoadAssembly(MergedAssembly mergedAssembly)
		at GleamTech.AssemblyResolver.AssemblyResolver.OnAssemblyResolve(Object sender, ResolveEventArgs args)
The AssemblyUltimate folder contains PortableEngine.dll, MSVCR100.dll and MSVCP100.dll. The app is running in 32 bit mode. The DocumentUltimate version is 3.8.0.

1 Reply

Reply to Thread
1
Lauri Kotilainen Replied
Marked As Resolution
Welp, turns out this is somehow related to running the app with a free shared plan -- upgrading the plan to a paid tier made the issue go away.

Reply to Thread