Configuration

In the previous example, I hard-coded the remoting configuration of both the client and server into the source code. I configured the server using the RegisterWellKnownServiceType method, and I configured the client using the RegisterChannel method and by specifying a URI in the GetObject method of the System.Activator class. If you want to change the type of channel that you are using (HTTP to TCP for instance), the port number, or the activation mode of the server object, you need to recompile the code. The .NET Framework supports a feature that allows you to configure your .NET applications using an XML configuration file. If you take advantage of this feature, you can easily change the .NET remoting configuration of both your ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.