When I run the website locally using my VS, everything works.
I am calling a function inside a dll using P/Invoke. DLL is in C++ and it works.
When I deploy the website on IIS, I get the error message
Unable to load DLL 'SolvingProbelm.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The dll resides inside the bin folder. App pool is Classic and .net 2.0
Any suggestions will be appreciated.
I had faced the similar problem once. Just copy
C:\WINDOWS\System32. Hopefully, it will work! It had worked in my situation. Actually native DLLs and .Net DLLs are searched differently. IIS searches native DLLs in
C:\Windows\System32 folder also. So copying your DLLs there solves problems!
I know it's been 10 years. But if someone should encounter the problem again, just make sure that Platform and Configuration have not changed in Project Properties under Build. In my case, Visual Studio had simply changed the Platform to All Platforms even though I had built all dlls before using Any CPU.
User contributions licensed under CC BY-SA 3.0