Friday, July 3, 2009

.NET Error: the specified module could not be found. (Exception from HRESULT: 0x8007007E)

I had this problem, when I tried to copy my application which was using AxAcroPDFLib.dll in another machine without using installation.

And tried to run it. When I try to open pdf file in acrobat browser control I got the above mentioned error.

The error clearly the specified module could not be found. (Exception from HRESULT: 0x8007007E) clearly

states that the application (irrespective of its type) failed due to a missing module.

Possible Reasons:

1. This error happens generally when the path of the unmanaged dlls is not found

This error is related with native files (.dll or .lib) referenced by managed dll are not in the PATH.

2. The .NET application look for a native dll in the System paths instead of the application bin directory.

3. There is a reason for that as well. .NET Framework loads any dll present in the application bin folder as a managed dll. When we place an unmanged native dll in that place, it fails to load the dll and complains, just as it is doing in this scenario.

4. MSVCR71.dll is missing.

5. The msvcr71.dll file is a 32-bit file that holds various functions used by .NET programs. The name comes from Microsoft Visual C++ runtime library, version 7.1. The msvcr71.dll should normally solve any msvcr71.dll errors that you are getting. At times, you may need to reboot your computer as well.

6. In normal cases, the msvcr71.dll file should already be availble on your computer system, if you are attempting to use a .NET based application on your computer, that makes use of the msvcr71.dll file. However, if the application installer is faulty OR if you have simply copied an application from another machine without using an installer, the msvcr71.dll file will probably be missing on your computer since it is NOT usually shipped with your Windows operating system, but deployed through installer programs deploying a .NET based application that you are installing on your computer.


Possible Solutions:

1. You need to figure out which managed dll, native dll and lib files are referenced by your application (directly or indirectly).

For managed dll, make sure they are in the web's/Windows bin folder.

2. Place the native dll in any of the probing paths specified in the exception trace.

3. We can also place the dll inside a custom folder and set its path to "PATH" environment variable at runtime.

4. Copy "MSVCR71.dll" in the Windows System Folder


5.The Windows System folder can be different depending on operating system and the install path that was originally used when your Windows Operating system has been installed. The defaults for this folder are:
- C:\Windows\System32\ on Windows XP
- C:\WINNT\System32\ on Windows NT and Windows 2000
- C:\Windows\System\ on Windows 9x and Windows ME

No comments:

Post a Comment