A Simple .NET Remoting Client and Server

Let's build a very simple .NET remoting client and server. The use of .NET remoting is intended for .NET clients and servers, so, unlike COM or CORBA, you don't have to deal with IDL. You define the types that you will use remotely using the same .NET languages that you use to implement the types. The application will therefore be composed of three separate assemblies: (1) a shared library that contains the remotable types, (2) a console application that will be the server application, and (3) a console application that will be the client application.

The Shared Library

The server will contain two types: a marshal-by-reference class called Company and a marshal-by-value class called Employee. The Company ...

Get .NET and COM Interoperability Handbook, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.