How to: Compile and Run a Basic Remoting Application
This topic is specific to a legacy technology that is retained for backward compatibility with existing applications and is not recommended for new development. Distributed applications should now be developed using the Windows Communication Foundation (WCF).
The following procedure shows how to use the command-line tools that ship with the .NET Framework SDK to compile the basic remoting application built in the topics How to: Build a Remotable Type, Building a Host Application, and How to: Build a Client Application. The instructions in each of these topics had you create a remoting
directory with subdirectories called type
, client
, and listener
.
To compile and run a basic remoting application
At the command prompt in the
remoting\type
directory, type the following command:vbc /t:library RemotableType.vb [C#] csc /noconfig /t:library RemotableType.cs
Copy
RemotableType.dll
into theremoting\client
andremoting\listener
directories.Copy
listener.exe.config
into theremoting\listener
directory.Copy
client.exe.config
into theremoting\client
directory.At the command-prompt in the
remoting\listener
directory, type the following command:vbc /r:RemotableType.dll Listener.vb csc /noconfig /r:RemotableType.dll Listener.cs
At the command-prompt in the
remoting\client
directory, type the following command:vbc /r:RemotableType.dll client.vb csc /noconfig /r:RemotableType.dll Listener.cs csc /noconfig /r:RemotableType.dll Client.cs
At the command prompt in the
remoting\listener
directory, typeListener
.When the
Listener
application is running, open a new command prompt in theremoting\client
directory and typeClient.