Search code examples
c#web-servicespinvoke

When does a web service load a external dll that it uses?


I have a web service that is using an external dll via pinvoke. My question is, when is the external dll loaded - when the web service starts or only when the service contract that invokes it is called?

Thanks


Solution

  • The unmanaged DLL is loaded when it is first used.

    This is the same behavior as with managed assemblies your program uses.