views:

40

answers:

1

Hello world,

I am stuck with my web application. As known from the title its a ASP.NET MVC(1,0) application so i do the only 2 things that a needed do deploy a application like this. I made a build an copied it to the IIS Folder. In the IDE (VS2008) all works fine :(.

This worked a long time. But know i get a error for my included dll of a other project. (I have a German version so the Error is Translated from google sry for that)

BadImageFormatException: File or assembly 'DataService.WebInterface.BusinessLogic "or one of its dependencies was not found. An attempt was made to load a file with an incorrect format.]
   System.Reflection.Assembly._nLoad (AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark & stackMark, throwOnFileNotFound Boolean, Boolean forIntrospection) +0
   System.Reflection.Assembly.InternalLoad (AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark & stackMark, Boolean forIntrospection) +416
   System.Reflection.Assembly.InternalLoad (String String assemblyName, Evidence assemblySecurity, StackCrawlMark & stackMark, Boolean forIntrospection) +166
   System.Reflection.Assembly.Load (String string assemblyName) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper (String assemblyName, Boolean starDirective) +190

What does that mean? Is the File corrupted or do i have to change the web.config?

Thank your for your support!

+1  A: 

This could mean that the project was targeted to different platform (x86/x64) than the server environment. Change the target platform in VS to match your server before publishing. Apart from that there is a setting in iis manager in application pools -> advance settings named "Enable 32-Bit Applications" - change it to "True" if you use 32b bit assemblies (or native assemblies) on 64 bit environment.

PanJanek
Thats it! thanks!
Markus