|
Using System.Runtime.Remoting; Using System.Runtime.Remoting.Channels; Using System.Runtime.Remoting.Channels.Http;
namespace DoAllApp { public class ActivateRemoting { private staticUseRemoting UseEventLog eLog1;
public static void Main(string[] Args) { eLog1=new UseEventLog("ActivateRemoting","Application Log"); //Configure our remote component using our configuration file RemotingConfiguration.Configure("UseRemoting.config"); //Configure our remote component programatically /* RemotingConfiguration.ApplicationName="UseRemoting"; ChannelServices.RegisterChannel(new HttpChannel(1001)); RemotingConfiguration.RegisterWellKnownServiceType( typeof(UseRemoting),"DoAll",WellKnownObjectMode.Singleton); */ /* WellKnownObjectMode.SingleCall: The remoting system will create an object each time a client method invokes a remote object WellKnownObjectMode.Singleton: The remoting system will have only one instance regardless of the number of clents */
eLog1.LogMessage("The remoting host application is up running"); } } }
|