Remoting Sample

Sample Overview

This sample demonstrates various aspects of the System.Runtime.Remoting namespace. 

There are three elements to this sample:

The server application supports the following user-specified options:

The client application supports the following user-specified options:

The shared library implements objects that are either MarshalByRef (for being passed by reference) or serializable (for being passed by value).  The client and server applications switch between these object types depending on user input.

Sample Source and Build Output Locations

The sample source is found in rotor\samples\howto\remoting in the client, server, and shared subdirectories. 

The source files are:

The build output location is %TARGETCOMPLUS%\samples\howto\remoting.  The output files are executable assemblies named remotingclient.exe and remotingserver.exe, and a library assembly named remotingshared.dll.

Building the Sample

All samples are built from the buildall script. 

You can also build all the samples by switching to the root of the sample directory, sscli\samples, and typing build -c.

You can build this specific sample by switching to the sample directory and typing build -c.

Running the Sample

These steps require that the Shared Source CLI (SSCLI) be already built and functional.

  1. Run env.bat or source the env.csh or env.sh script files depending on your platform.
  2. Switch to the %TARGETCOMPLUS%\samples\howto\remoting directory.
  3. Type the following command:

    clix remotingserver

  4. In another console window type:

clix remotingclient

The sample applications will prompt you for optional values.  Make sure that the client and server match input for object type (ByVal or ByRef) and communication channels.


Copyright (c) 2002 Microsoft Corporation. All rights reserved.