Resolving assembly dependencies when using a windows service

K

Keith

Hello,

I have a windows service that hosts a WCF service. The WCF service is
dependent on an set of assemblies (aside from the standard .NET ones) that
aren't in the GAC, but are located in the same directory as the service
executable. One assembly is plain C#, the other is a vendor-provided
Interop .dll that calls a COM .dll; they are used in that order (the WCF
service calls the C# .dll, which calls the interop, which calls the COM).

I'm using InstallUtil to install the service.

The problem is that when the service is used it can't find/load the
assemblies. I've used the fusion viewer to inspect the binding logs, and in
the "native" section the Interop assembly has the following in its log:

LOG: Start binding of native image Interop.QBXMLRP2ELib, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=6e0be22769c60cc7.
WRN: No matching native image found.

Does that imply that the COM .dll can't be found? If the C# .dll is called
from a Windows/console app, it works fine, suggesting that this isn't a COM
registration problem. Adding both the C# and the interop .dll to the GAC
does NOT alter this behavior, suggesting this isn't a problem on the .NET
side.

So is this a path issue? An app.config issue? Do I need to give the
service special privs to use COM (it is already running as LocalSystem)?

Any advice or suggestions are welcome.

Keith

P.S. I posted this here instead of the Indigo ng because it seems to be more
general to Windows Services as opposed to specific to WCF.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top