Friday, May 29, 2009

Error: Failed to load data access DLL, 0x80004005

Problem: Ever got the following error while executing a command in WinDbg?

Failed to load data access DLL, 0x80004005
Verify that 1) you have a recent build of the debugger (6.2.14 or newer)
2) the file mscordacwks.dll that matches your version of mscorwks.dll is
in the version directory
3) or, if you are debugging a dump file, verify that the file
mscordacwks___.dll is on your symbol path.
4) you are debugging on the same architecture as the dump file.
For example, an IA64 dump file must be debugged on an IA64
machine.

You can also run the debugger command .cordll to control the debugger's
load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload.
If that succeeds, the SOS command should work on retry.

If you are debugging a minidump, you need to make sure that your executable
path is pointing to mscorwks.dll as well.

Resolution:

Make sure you have correct version of mscordacwks.dll in your .Net Framework path (normally C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727). To know which version the WinDbg is looking for run the following command.
.symfix nosiy
The above command will enable the verbose mode of all module loads, including any erorr found by WinDbg.
Run .reload command to know which module is failing to load.
If the above command passes without any error, and you are still getting the same error while exeucting any command, check the output of WinDbg after you ran the command. It will be something like

CLRDLL: Unable to get version info for 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll', Win32 error 0n87
CLRDLL: Unable to find mscordacwks_x86_x86_2.0.50727.42.dll by mscorwks search
CLRDLL: Unable to find 'mscordacwks_x86_x86_2.0.50727.42.dll' on the path
CLRDLL: Unable to find mscorwks.dll by search
CLRDLL: ERROR: Unable to load DLL mscordacwks_x86_x86_2.0.50727.42.dll, Win32 error 0n2

Now you need to find the correct version and rename the dll to the above bold convention mscordacwks_x86_x86_.dll . You can get this file from the system the dump was taken on.
Place this dll in your framework path and everything should work now.

No comments:

Post a Comment