I am trying to run ServiceStack Examples projects. When I run the web client I am getting the following error:
{System.BadImageFormatException: An attempt wa
Set the platform target of your main project to x86 to fix this. This can be done under Project... -> Properties -> Build.
SqlLite is most likely a 32-bit components, and to be able to load it your application needs to be a 32-bit application as well (64-bit processes cannot load 32-bit components and vice versa).
This is a problem when trying to load the 32bit sqlite.dll with a 64bit IIS/pc.
To get it to work you need to 'Enable 32-bit Applications' for your AppDomain by:
For a more timely response feel free to send a link to any ServiceStack related questions to the ServiceStack Google Group.
Update: I forgot to add: you also need your top-most level project (i.e. your ASP.NET web application) to have its build configuration set to x86 (32bit).
If you download the latest version of ServiceStack.Examples (v2.01) this should now work on 64bit servers.
More information about this can be tracked on:
https://groups.google.com/d/topic/servicestack/EUPqF2jI4ig/discussion