Question

I have created two projects to understand the basics of .NET Remoting.

  1. Server Project: I created the class library of RemoteObject within server solution.
  2. Client Project: I create proxies from this project to use RemoteObject of Server.

The problem: Client has two know about the types that it is remoting. But how can it do that? Do you think Client should reference RemoteObject dll in server project. I think it is useless if these projects are distributed on different machines. Similarly, copying the dll to the client sounds bad. So what the optimal solution should be?

Thank you,

Was it helpful?

Solution

Create the interface that has the functionality you need in separate dll.

In server, derive from that interface and implement functionality. In client, reference the interface and create remote proxy for it, which will give you access to server implementation but at the same time you won't ship your server code with the client.

OTHER TIPS

You need 3 projects:

  • one with shared interfaces
  • one with the server implementation of those interfaces
  • one with the client components.

Both the server and the client, will need to reference the assembly with the shared interfaces.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top