Server-activated Remote Object Server Sample

Whenever a Web service or a remote object is generated, a configuration file is also created. Below is a sample of a custom host application using a server-actived remote object and a sample configuration file.

using System;
using System.Runtime.Remoting;

namespace CSharpClient
	/// <summary>
	/// A simple console application that demonstrates how to host a
	/// server-activated remote object.  This application listens for
	/// client requests on TCP port 8989.
	/// </summary>
	class Class1
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		static void Main(string[] args)
				//Configure RemoteTestFactory as a server-activated object

				//Wait for remote client requests
				Console.WriteLine("Listening for requests. Press Enter to exit...");

			catch (Exception xx)

Sample Configuration File for Server-activated RemoteTestServer.config

<?xml version="1.0" encoding="UTF-8"?>
<!-- Configuration for a server-activated RemoteTestFactory singleton-->
<wellknown mode="Singleton" type="Test.RemoteTestFactory, Test" objectUri="Test"/>
<channel port="8989" ref="tcp">
<formatter ref="binary"/>
Related Topics
Bullet Using Tasks in Your Applications, Overview
Bullet Building Applications Using Native Win32 Technologies
Bullet Proxy Service Interface API Reference