WebReference.com - Part 1 of Chapter 6: Professional C# Web Services, from Wrox Press Ltd (6/8)
[previous] [next] |
Professional C# Web Services
Running the Server and the Client
Let's take a step back to look at the files we created so far. This table helps to summarize the files and assemblies and their purposes:
| Class | Source File | Assembly File | Description |
MyRemoteObject |
MyRemoteObject.cs |
MyRemoteObject.dll |
Remote object class. We offer the Hello() method. |
SimpleServer |
SimpleServer.cs |
SimpleServer.exe |
The server creates and registers a server channel. We use the configuration file
SimpleServer.exe.config to configure the channel and the remote object. |
SimpleClient |
SimpleClient.cs |
SimpleClient.exe |
The client application. The configuration file SimpleClient.exe.config
defines how to connect to the remote object. |
Starting the server and then the client we get the following output from the client:

This is the output screen from the server. We can see that the constructor of the remote object is called twice. The remoting infrastructure instantiates the remote object once before the client activation takes place:

As we have seen it was an easy task to build a simple client and server: create a remote object class, and implement a client and a server. If we are using configuration files, only one remoting call is necessary to read the configuration file and start the channel.
There's a lot more that is provided by .NET remoting. In the next section we will look at more of the terms of this architecture, and discuss all the sub-namespaces and their purpose.
[previous] [next] |
Created: February 13, 2002
Revised: February 13, 2002
URL: http://webreference.com/programming/csharp/webservices/chap6/1/6.html

Find a programming school near you