2
votes

I Am using a 3rd party DLL. The dll did not have a strong name so i signed it. I pasted the signed DLL in to a Layouts Mapped folder of my application and added reference. During runtime i am getting a file not found exception for this DLL. I used fuslogvw to trace the assembly bind failure log. which i will paste below kindly guide me. I am a newbie to .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

1 Answers

1
votes

Looks like you are trying to bind 32-bit 3rd party native DLL on a 64-bit system. Either register the x64 version of the DLL or change you project to be compiled for the x86 target.