Solution:Your program is trying to use a DLL targeted for win32 on an x64 platform, or the reverse: you have an x64 DLL and are trying to run it on a win32 computer.
C# dll is built for 'Any CPU' platform by default. On 64 bit machine 'Any CPU' maps to 64 bit platform. Now when I run such a C# project which has been built for 'Any CPU' platform and refers a 32bit dll, BadImageFormatException is thrown because loader tries to load a 32 bit dll in 64 bit process address apace which is obviously going to fail.
so you either need to run it in a 32-bit OS or you have to make your application run inside WoW64. To force the app to run in WoW64 you can go to the project properties in VS, select the "build" tab, and set the "platform target" to x86.
//-------------------------------总结-------------------------
2008R2 website站点类型配置为 anycpu or x64
IIS7.5站点应用程序池 -〉高级设置-〉更改启用32位应用程序兼容,不建议使用
辨识64 or 32位运行通过任务管理器,w3wp.exe 后没有*32说明程序运行在64位池下,尽情享受高性能...
下载说明
☉本站所有源码和资源均由站长亲自测试-绝对保证都可以架设,运营!
☉如源码和资源有损坏或所有链接均不能下载,请告知管理员,
☉本站软件和源码大部分为站长独资,资源购买和收集,放心下载!
☉唯一站长QQ:1004003180 [人格担保-本站注重诚信!]
☉购买建议E-mail:1004003180@qq.com 源码收购 E-mail:1004003180@qq.com
☉本站文件解压密码 【文章内都自带解压密码,每个密码不同!】