-1

I have a working distributed application that has a rather big blemish. The client.exe needs the server.exe to work.

The reason for this is that the client and server use a MarshalByRef Class (which exists on both sides in the form of a .DLL) which contains a reference to the server.

Is there any way I can rearrange things so that I don't need a copy of the server.exe on the client?

c_uld
  • 81
  • 1
  • 9

2 Answers2

1

Yes.

Create a seperate assembly (dll), which contains the shared classes / interfaces, and distribute that dll with your client and server. By doing so, the client doesn't need the server.exe, it just needs the shared dll.

Frederik Gheysels
  • 56,135
  • 11
  • 101
  • 154
1

Create an interface that represents the methods, properties, etc, of this MarshalByRef class, have the class implement this interface, place the interface in a separate DLL, and just use that from the client.

There are plenty of examples around if you google for remoting interface.

Damien_The_Unbeliever
  • 234,701
  • 27
  • 340
  • 448