I have a client application (on a remote machine) referencing a C# managed COM+, Server Application (TestServer). The TestServer component references and uses another C# server based DLL (TestClassLibrary). The client does not need to know anything about the
'TestClassLibrary' dll as none of those types are used as parameters or return types in the public interface. When running the client I get the following error: System.IO.FileNotFoundException: File or assembly name TestClassLibrary, or one of its dependencies,
was not found. File name: "TestClassLibrary". Once the TestClassLibrary is installed in the GAC or if it is copied to the client application directory it seems to work fine! Can anyone explain this behaviour? Why does the client need the dll on the local machine?
The COM+ application is a a server application. The proxy is installed on the client. I have actually coded a test VB6 app (with both early and late binding to the server process) which works fine without requiring the TestClassLibrary to be installed. With
SOAP (web service) it also works fine from a .Net windows client. The point is that no software on the client needs the Server based TestClassLibrary yet the .Net windows client needs it to be installed either in the client GAC or in the same app directory
on the client. Just to recap what I have done: 1. Create C# COM+ Server application (TestServer) 2. Create C# DLL (TestClassLibrary) used by TestServer on server only i.e no members, parameters or return types are exposed via TestServer. 3. Export and install
COM+ proxy on client machine. 4. Create C# Client application (TestClient) referencing TestServer which fails as mentioned. 5. Switch C# Client application (TestClient) to use a web service connecting to Testserver which works. 6. Create VB6 Client application
(TestVB6Client) referencing TestServer which works.
gc1
Member
15 Points
3 Posts
Referencing COM+ (C#) dlls
Mar 29, 2004 01:35 PM|LINK