BadImageFormatException when trying to reference K2 API.

  • 29 October 2009
  • 1 reply
  • 0 views

Badge +1

Hello,


When IIS in Windows 2008 x64 tries to start up and is running through the assemblies it dies with:


Message: Could not load file or assembly 'SourceCode.Workflow.Client' or one of its dependencies. An attempt was made to load a program with an incorrect format. (C:WindowsMicrosoft.NETFramework64v2.0.50727Configweb.config line 59)


Typically a BadImageFormatException has to do with an x86 vs x64 mismatch.  Our assemblies are built with Any CPU. 


Are there any x86 or x64 restrictions on the K2 assemblies?


-Sean


1 reply

Badge +9

The K2 client assemblies are x86 or x64 specific.  Normally, this error happens when you copy x64 dlls to a x86 web application or vice versa.


To fix this, you need to get a copy of the correct assemblies from the appropriate platform.  I guess it's a lot easier to keep the web and K2 server on the same platform type.  This tends to reduce issues like this.

Reply