[BadImageFormatException: 未能加载文件或程序集“IBM.Data.DB2”或它的某一个依赖项。试图加载格式不正确的程序。]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +118

解决方案 »

  1.   

    未能加载文件或程序集"IBM.Data.DB2"或它的某一个依赖项.  这个问题一般会出现在  64位操作系统的机器上!  针对这种情况,请用以下的解决方案解决! 【应用程序池】--找到你部署项目的程序池 【右键】----【属性】---【高级设置】---【启用32位应用程序】的属性这是为 true 就好了!
      

  2.   

    确认IBM.Data.DB2是否存在,如果存在,再看版本是否一致,比如你用的是.net 4.0,而引用的IBM.Data.DB2是for 2.0的
      

  3.   

    缺少 IBM.Data.DB2” 这DLL