2011-12-12 185 views
0

我有一个ASP.NET网站/ WPF/Windows手机应用程序,它们都使用三个链接的项目。在数据项目(Myproject.DAL)中,我使用对System.Data.SQLiteICSharpCode.SharpZipLib的引用。后者似乎被编译为运行在VS版本2.0,即使我下载了4.0版本(也许是我的误解)。加载共享类库时出错

enter image description here

当我尝试加载ASP.NET 4个网站,我得到一个错误:

Could not load file or assembly 'ChickenPing.DAL' or one of its dependencies. An attempt was made to load a program with an incorrect format. 

我记得有过去这个问题,它由System.Data引起.SQLite库,它是一个x86二进制文件。我已更新,这绝对不是原因。所有项目都设置为以.NET 4 x86运行。有什么方法可以追踪这个实际的原因吗?我猜测肯定是某个地方的问题DLL,但MSBuild似乎没有报告任何问题。

尽管开启融合记录,唯一神秘的错误我得到的是:

=== Pre-bind state information === 
LOG: User = IIS APPPOOL\CP 
LOG: DisplayName = ChickenPing.DAL 
(Partial) 
WRN: Partial binding information was supplied for an assembly: 
WRN: Assembly Name: ChickenPing.DAL | Domain ID: 9 
WRN: A partial bind occurs when only part of the assembly display name is provided. 
WRN: This might result in the binder loading an incorrect assembly. 
WRN: It is recommended to provide a fully specified textual identity for the assembly, 
WRN: that consists of the simple name, version, culture, and public key token. 
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue. 
LOG: Appbase = file:///C:/Users/echilon/Documents/CP/ 
LOG: Initial PrivatePath = C:\Users\echilon\Documents\CP\bin 
Calling assembly : (Unknown). 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: C:\Users\echilon\Documents\CP\web.config 
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. 
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/7bfa5a6e/c6574e91/ChickenPing.DAL.DLL. 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/7bfa5a6e/c6574e91/ChickenPing.DAL/ChickenPing.DAL.DLL. 
LOG: Attempting download of new URL file:///C:/Users/echilon/Documents/CP/bin/ChickenPing.DAL.DLL. 
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated. 

这并没有真正提供很大的启示。

回答

0

原来这是一个设置 - “启用32位应用程序”在应用程序池设置的“高级设置”部分。 fix