How to Remote Application Configuration

The .NET Remoting functionality enables applications to expose Remotable Objects beyond the boundaries of the local process or across different computers via network connections. The .NET Framework provides two built-in formatters, Binary Formatter and SOAP Formatter, as well as two channels, TcpChannel and HttpChannel, to facilitate communication between remote objects. The configuration of formatters and channels is conveniently accomplished through XML-based configuration files, which allow for easy customization and adjustment of remoting settings to suit specific requirements.

.NET Remoting configuration

Configuration plays a crucial role in providing the essential information to the .NET Remoting Framework. There are two approaches for supplying .NET Remoting configuration parameters. The first approach involves directly providing the necessary information to the server and client through program coding. Alternatively, the configuration parameters can be specified through a Machine.config file, which offers a centralized and efficient method for managing and distributing configuration settings across multiple components within the .NET Remoting environment.

Utilizing a configuration file provides distinct advantages over hardcoded parameters as it enables the configuration of remote object parameters without the need for modifying the source code or recompiling the application. This approach allows for flexible and dynamic configuration management, enhancing maintainability and simplifying future updates or modifications to the remote object's parameters, all without disrupting the overall application functionality.

Following are the information provided by configuration file :

  1. Metadata describing the Remote Type.
  2. Type of Activation.
  3. Channels.
  4. The URL that uniquely identifies the object of that type.

Here we have to provide configuration information to Listener Object and also Client Object .

Listener Configuration

csharp-timeListener.exe.config

Click here to download TimeListener.exe.config

Client Configuration

csharp-Client.exe.config

Click here to download Client.exe.config