Sarfaraz Nawaz
Sarfaraz Nawaz

Reputation: 361402

Difference between win32 dll and .net dll in the context of web application?

My web application, written in WPF( XBAP), p/invokes a win32 dll (player.dll written in C and C++). I deployed the application. When I tried running the web-application in IE, initially I got this error:

System.DllNotFoundException: Unable to load DLL 'Player.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

But when I manually copied my win32 dll to C:\Windows\System32 of the client PC, it worked, even though my web application uses several other .Net dlls and I didn't copy them manually.

So I'm confused as to why exactly do I need to copy only win32 dll to the client PC, while not .Net dlls? Do web-applications access them differently?

--

The related topic is this :

DllNotFoundException when web application p/invokes a win32 DLL

Upvotes: 2

Views: 1419

Answers (1)

Daniel Gehriger
Daniel Gehriger

Reputation: 7468

The rules to locate assemblies (.NET) are not the same as for locating native DLLs. Here are the two rule sets:

Upvotes: 1

Related Questions