The module was expected to contain an assembly manifest. ASP.NET IIS Express

846 views
Skip to first unread message

ch...@marisic.com

unread,
Dec 23, 2015, 1:27:22 PM12/23/15
to Siaqodb - NoSQL embedded database for .NET
Trying to run Siaqodb on an asp.net webapp locally using IIS express on Win8.1 VS2013up5

Running as AnyCPU

Server Error in '/' Application.

Could not load file or assembly 'file:///C:\Projects\Mn22\Web1\bin\lmdb32.dll' or one of its dependencies. The module was expected to contain an assembly manifest.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.BadImageFormatException: Could not load file or assembly 'file:///C:\Projects\Mn22\
Web1\bin\lmdb32.dll' or one of its dependencies. The module was expected to contain an assembly manifest.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'file:///C:\Projects\Mn22\
Web1\bin\lmdb32.dll' could not be loaded.

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Projects\Mn22\Web1\bin\lmdb32.dll
LOG: Appbase = file:///C:/Projects/M/DB2/Web1/
LOG: Initial PrivatePath = C:\Projects\Mn22\Web1\bin
Calling assembly : (Unknown). === LOG: This bind starts in LoadFrom load context. WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load(). LOG: Using application configuration file: C:\Projects\Mn22\Web1\web.config
LOG: Using host configuration file: C:\Users\chris.marisic\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Attempting download of new URL file:///C:/Projects/Mn22/Web1/bin/lmdb32.dll.
ERR: Failed to complete setup of assembly (hr = 0x80131018). Probing terminated.

Stack Trace: 

[BadImageFormatException: Could not load file or assembly 'file:///C:\Projects\Mn22\Web1\bin\lmdb32.dll' or one of its dependencies. The module was expected to contain an assembly manifest.]
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) +34 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152 System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) +102 System.Reflection.Assembly.LoadFrom(String assemblyFile) +34 WebActivator.PreApplicationStartCode.Start() in D:\Code\Bitbucket\WebActivator\WebActivator\PreApplicationStartCode.cs:11 [InvalidOperationException: The pre-application start initialization method Start on type WebActivator.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'file:///C:\Projects\Mn22\Web1\bin\lmdb32.dll' or one of its dependencies. The module was expected to contain an assembly manifest..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +547 System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +132 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102 System.Web.Compilation.BuildManager.ExecutePreAppStart() +153 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +521 [HttpException (0x80004005): The pre-application start initialization method Start on type WebActivator.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'file:///C:\Projects\Mn22\Web1\bin\lmdb32.dll' or one of its dependencies. The module was expected to contain an assembly manifest..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9931916 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

aaa

Siaqodb Support

unread,
Dec 28, 2015, 10:36:11 AM12/28/15
to Siaqodb - NoSQL embedded database for .NET, ch...@marisic.com
Hello Chris,
Did you used Nuget? Normally nuget package will inject code in your csproj file and VS will copy automatically necessary lmdb dll files. However sometimes it seems it fail. So please copy manually lmdb32.dll and lmdb64.dll in your /bin folder and the problem will be fixed.

Cristi

ch...@marisic.com

unread,
Dec 29, 2015, 9:52:13 AM12/29/15
to Siaqodb - NoSQL embedded database for .NET, ch...@marisic.com
Both lmdb32.dll and lmdb64.dll are in the bin folder. It's returning a badformat exception not a can't find exception.

Siaqodb Support

unread,
Dec 29, 2015, 3:51:24 PM12/29/15
to Siaqodb - NoSQL embedded database for .NET, ch...@marisic.com
Can you send us a sample project(including /bin and /obj folders) to :support at siaqodb dot com ?
Thx!
Cristi
Reply all
Reply to author
Forward
0 new messages