Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
510 views
in Technique[技术] by (71.8m points)

.net - How to find out which dependency is failing to load

I am getting the following error when trying to run a web application:

Exception information: 
    Exception type: ConfigurationErrorsException 
    Exception message: Could not load file or assembly 'Atalasoft.dotImage.AdvancedDocClean.DLL' or one of its dependencies. The specified module could not be found.

I am running on Windows Server 2003 & .NET Framework 4.0. The same binaries and dll's are running successfully on a Windows Server 2008 R2 server.

How can I find out which dependency is failing to load?

Edit

Fusion logging shows the following:

*** Assembly Binder Log Entry  (4/11/2011 @ 2:37:42 PM) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:  C:WINDOWSMicrosoft.NETFrameworkv4.0.30319clr.dll
Running under executable  C:WINDOWSSysWOW64inetsrvw3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = NT AUTHORITYNETWORK SERVICE
LOG: DisplayName = Atalasoft.dotImage.AdvancedDocClean
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Atalasoft.dotImage.AdvancedDocClean | Domain ID: 4
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:///K:/App/Prd/SEMS/asp/sems/
LOG: Initial PrivatePath = K:AppPrdSEMSaspsemsin
LOG: Dynamic Base = C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Filessemscd484e8d
LOG: Cache Base = C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Filessemscd484e8d
LOG: AppName = a29ce80f
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: K:AppPrdSEMSaspsemsweb.config
LOG: Using host configuration file: \?C:WINDOWSmicrosoft.netFrameworkv4.0.30319aspnet.config
LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv4.0.30319configmachine.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/Framework/v4.0.30319/Temporary ASP.NET Files/sems/cd484e8d/a29ce80f/Atalasoft.dotImage.AdvancedDocClean.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/sems/cd484e8d/a29ce80f/Atalasoft.dotImage.AdvancedDocClean/Atalasoft.dotImage.AdvancedDocClean.DLL.
LOG: Attempting download of new URL file:///K:/App/Prd/SEMS/asp/sems/bin/Atalasoft.dotImage.AdvancedDocClean.DLL.
LOG: Assembly download was successful. Attempting setup of file: K:AppPrdSEMSaspsemsinAtalasoft.dotImage.AdvancedDocClean.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: Atalasoft.dotImage.AdvancedDocClean, Version=9.0.2.43320, Culture=neutral, PublicKeyToken=2b02b46f7326f73b
LOG: A partially-specified assembly bind succeeded from the application directory. Need to re-apply policy.
LOG: Using application configuration file: K:AppPrdSEMSaspsemsweb.config
LOG: Using host configuration file: \?C:WINDOWSmicrosoft.netFrameworkv4.0.30319aspnet.config
LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv4.0.30319configmachine.config.
LOG: Post-policy reference: Atalasoft.dotImage.AdvancedDocClean, Version=9.0.2.43320, Culture=neutral, PublicKeyToken=2b02b46f7326f73b
LOG: GAC Lookup was unsuccessful.
LOG: Binding succeeds. Returns assembly from C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Filessemscd484e8da29ce80fassemblydl363ae24d28096e5c_94f5cb01Atalasoft.dotImage.AdvancedDocClean.dll.
LOG: Assembly is loaded in default load context.

Edit

Output from CppCodeProvider that failed to load

*** Assembly Binder Log Entry  (4/11/2011 @ 2:37:42 PM) ***

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

Assembly manager loaded from:  C:WINDOWSMicrosoft.NETFrameworkv4.0.30319clr.dll
Running under executable  C:WINDOWSSysWOW64inetsrvw3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = NT AUTHORITYNETWORK SERVICE
LOG: DisplayName = CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///K:/App/Prd/SEMS/asp/sems/
LOG: Initial PrivatePath = K:AppPrdSEMSaspsemsin
LOG: Dynamic Base = C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Filessemscd484e8d
LOG: Cache Base = C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Filessemscd484e8d
LOG: AppName = a29ce80f
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: K:AppPrdSEMSaspsemsweb.config
LOG: Using host configuration file: \?C:WINDOWSmicrosoft.netFrameworkv4.0.30319aspnet.config
LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv4.0.30319configmachine.config.
LOG: Post-policy reference: CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/sems/cd484e8d/a29ce80f/CppCodeProvider.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/sems/cd484e8d/a29ce80f/CppCodeProvider/CppCodeProvider.DLL.
LOG: Attempting download of new URL file:///K:/App/Prd/SEMS/asp/sems/bin/CppCodeProvider.DLL.
LOG: Attempting download of new URL file:///K:/App/Prd/SEMS/asp/sems/bin/CppCodeProvider/CppCodeProvider.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/sems/cd484e8d/a29ce80f/CppCodeProvider.EXE.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/sems/cd484e8d/a29ce80f/CppCodeProvider/CppCodeProvider.EXE.
LOG: Attempting download of new URL file:///K:/App/Prd/SEMS/asp/sems/bin/CppCodeProvider.EXE.
LOG: Attempting download of new URL file:///K:/App/Prd/SEMS/asp/sems/bin/CppCodeProvider/CppCodeProvider.EXE.
LOG: All probing URLs attempted and failed.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Well, the dependency that seems to be missing is Atalasoft.dotImage.AdvancedDocClean.DLL. When you run this on the 2008 machine, do you know from where this DLL is being loaded? Do you have it locally deployed in the bin directory of the web app, or is it installed somewhere on that machine, or installed in the GAC?

Another thing to verify is that you're running the same version of .NET on both machines. If the 2008 machine is running .NET 4, and the 2003 machine is not, you may not be loading the same DLLs.

A useful tool for debugging assembly loading problems is Fusion. Fusion logging comes with .NET, you just need to enable it, and use the Fusion Log Viewer:

http://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...