第三方dll的程序集绑定失败

时间:2012-05-30 11:56:25

标签: asp.net .net .net-assembly

我正在使用第三方DLL。这个dll没有强大的名字,所以我签了名。我将已签名的DLL粘贴到我的应用程序的Layouts Mapped文件夹中并添加了引用。在运行时,我得到此DLL的文件未找到异常。我使用fuslogvw来跟踪程序集绑定失败日志。我将贴在下面亲切地指导我。我是.net的新手

*** Assembly Binder Log Entry  (5/30/2012 @ 5:12:13 PM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable  c:\windows\system32\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = ExcelLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b182d73c05ed7959
 (Fully-specified)
LOG: Appbase = file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/
LOG: Initial PrivatePath = C:\inetpub\wwwroot\wss\VirtualDirectories\2000\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\4782bf2e
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\4782bf2e
LOG: AppName = cf0ac865
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\inetpub\wwwroot\wss\VirtualDirectories\2000\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4782bf2e/cf0ac865/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4782bf2e/cf0ac865/ExcelLibrary/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/bin/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/bin/ExcelLibrary/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/_app_bin/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/_app_bin/ExcelLibrary/ExcelLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4782bf2e/cf0ac865/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/4782bf2e/cf0ac865/ExcelLibrary/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/bin/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/bin/ExcelLibrary/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/_app_bin/ExcelLibrary.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/2000/_app_bin/ExcelLibrary/ExcelLibrary.EXE.
LOG: All probing URLs attempted and failed.

1 个答案:

答案 0 :(得分:1)

看起来您正在尝试在64位系统上绑定32位第三方本机DLL。注册DLL的x64版本或更改为x86目标编译的项目。