This sample is designed to show how to use the .NET Remoting architecture using three types of remote objects. In addition, it uses XML configuration files to specify available objects and server location information instead of hard-coding them into the binaries or putting the data into the system registry.
The sample contains three solutions:
Each solution has one project.
One of the projects (RemoteCustomer) is a class library that exposes three creatable types:
To make it easier to configure, each class lives in the same namespace, RemotingSample, which is defined in each class source file.
The Host project contains a Windows Forms application that will read an XML configuration file named Host.exe.config to make available the classes defined in the RemoteCustomer project. For a production application, you might want to host the class library (RemoteCustomer.dll) in a Windows service.
The Client project is also a Windows Forms application. It relies upon a configuration file named Client.exe.config to know where to look for the remote objects.
Requires the Trial or Release version of Visual Studio .NET Professional (or greater).
Before running the demo, you need to build all three projects. You should build them in this order:
Once the binaries have been build, you will need to start the Host application first to make sure your objects are available for remoting. Next start your client.
If you wish to test on two different machines, you will need to make changes to the client's .config file changing localhost to an IP address or DNS name for the server machine. In addition, you might need to change the server's file if you change the port number. See the comments in both the client's .config file and the host's .config file for examples.