recently, a project was developed that used a DLL file interface for non-. net development, and found that after publishing to the window2003 server, the running Web site always prompts "unable to load DLL" D:\11\1.dll ": The specified module could not be found. (exception from hresult:0x8007007e). "this Error. But I can debug on a local XP System.
DLL uses COM calls as follows
[DllImport (@ "D:\11\1.dll", entrypoint = "aaa", CharSet = charset.ansi, CallingConvention = callingconvention.stdcall)]
public static extern Boolean AAA (bool x);
Question Address: http://topic.csdn.net/u/20121031/17/2085fdf4-cf81-4cf9-8650-e02c1ed8d67d.html
Workaround:
Step one: The DLL call uses an absolute path, such as DllImport (@ "D:\11\1.dll" or putting the calling DLL file into the system32 directory.
Refer to http://blog.csdn.net/xsgreen/article/details/3647501
Step Two: Use the Depends.exe tool to see which components (other DLL files) are referenced by the DLL file to be invoked, to search the server System32 directory, to compare whether the component referenced by the DLL exists in the server System32 directory, and if it does not exist, copy the missing DLL files to the same DLL file to be called The Directory. After comparison, found that the server system32 directory is missing borlndmm.dll this DLL file, copy Borlndmm.dll to the server D-disk 11 folder, The problem is Resolved.
Step Three: If the above has not been resolved, it should be a permissions issue, Select to call the DLL file folder, the right mouse button-"security-" add the ASPNET account (asp), check the full Control.
If the above three steps are not enough, you do not know.
SOURCE Address: http://www.cnblogs.com/slyzly/articles/2748940.html
Last note: Depends.exe tools, good ~ ~
Asp. NET calls an unmanaged dll, cannot load the dll, cannot find the specified module workaround.