This project is read-only.

Adding Google API dll's to bin directory breaks extensions

Jul 4, 2010 at 11:29 PM

Hi all!

I'm playing with the Google Picasa API's to integrate some of my pictures on picasa into my blogengine v1.6 powered website. I've created a UserControl that retrieves some pictures from picasa and displays them on my website which is working fine. The issue is that adding the Google API dll's into my blogengine /bin/ folder my extensions are destroyed. Opening the list of extensions in the blogengine extension viewer doesn't show a single extension.

Removing the Google API dll's from the /bin/ folder fixes my extensions again but then (of course) my picasa UserControl is not working anymore. I do see the event copied below on my webserver multiple times while trying to solve this issue. It looks like the blogengine code has issues with the zlib.x86.dll which is part of the Google API.

Any help is much appreciated.

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/4/2010 11:58:38 PM
Event time (UTC): 7/4/2010 9:58:38 PM
Event ID: a116349711c2499c990ef106af452a2a
Event sequence: 72
Event occurrence: 1
Event detail code: 0
Application information:
    Application domain: /LM/W3SVC/1971838280/Root-16-129227542914838690
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\Inetpub\wwwroot\blog\
Process information:
    Process ID: 11832
    Process name: w3wp.exe
Exception information:
    Exception type: BadImageFormatException
    Exception message: Could not load file or assembly 'file:///C:\Inetpub\wwwroot\blog\bin\zlib.x86.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
Request information:
    Request URL: http://<masked>/Default.aspx
    Request path: /Default.aspx
    Is authenticated: False
    Authentication Type:  
    Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
    Thread ID: 10
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at BlogEngine.Core.Utils.GetCompiledExtensions(ArrayList assemblies) in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Utils.cs:line 570
   at BlogEngine.Core.Utils.CodeAssemblies() in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Utils.cs:line 502
   at BlogEngine.Core.Utils.LoadExtensions() in C:\Data\Development\BlogEngine.NET\BlogEngine\DotNetSlave.BusinessLogic\Utils.cs:line 515
   at ASP.global_asax.Application_Start(Object sender, EventArgs e)
Custom event details:

For more information, see Help and Support Center at

Jul 15, 2010 at 11:28 AM


After some reading and testing I found the solution: zlib.x86.dll is not a required dll for the Google Picasa API and can be deleted aftger which everything works fine. It does however break the BlogEngine.NET because it is trying to open all dll's in the bin folder and looking for manifest information on the file. The zlib.x86.dll doesn't contain manifest information resulting in the exception mentioned above.

For future releases of BlogEngine.NET it would be great if the error handling on this gets improved to avoid that a corrupt file breaks the complete BlogEngine extensions.


Jul 15, 2010 at 6:19 PM

Thanks for pointing this out, will be fixed.