我试图将asp .net MVC应用程序部署到II7上,并得到以下错误:
Could not load file or assembly 'System.Web' or one of its dependencies. An attempt was made to load a program with an incorrect format. 服务器有.net 3.5 SP1,而我尝试将dll包括在网站的垃圾桶中,没有运气!
我注意到在服务器上的GAC中有两个System.Web 2.0 --一个是处理器架构的x86,另一个是AMD64 (服务器是Intel ),这会导致这个错误吗?
谢谢
解决方案:将构建平台目标更改为x64,doh!
发布于 2009-08-10 14:00:28
GAC里应该有两个人。一个是32位,另一个是64位。从错误中听起来,您正在尝试将64位dll加载到32位进程中.程序编译为什么?服务器操作系统是什么位?
发布于 2009-09-15 14:56:36
在x64 IIS7上得到相同的错误。我将Application设置“启用32位应用程序”更改为true。
https://stackoverflow.com/questions/1255060
复制相似问题