Programmatic Registration
In Chapter 2, you learned how to register .NET Remoting channels for a component host and a client that uses configuration files. As with most tasks in .NET, anything you can do, you can do in code.
Consider the following configuration file, which you might remember from Chapter 2. It defines a single registered SingleCall object type and a TCP/IP listening channel on port 8080.
<configuration> <system.runtime.remoting> <application name="SimpleServer"> <service> <wellknown mode="SingleCall" type="RemoteObjects.RemoteObject, RemoteObjects" objectUri="RemoteObject" /> </service> <channels> <channel ref="tcp server" port="8080" /> ...
Get Microsoft® .NET Distributed Applications: Integrating XML Web Services and .NET Remoting now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.