Remoting In Dotnet

  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Remoting In Dotnet as PDF for free.

More details

  • Words: 131
  • Pages: 2
project : Class Library code at : MyRemotingClassEx using System; using System.Collections.Generic; using System.Text; namespace MyRemotingObjectEx { public class MyRemotingClassEx : MarshalByRefObject { public string GetRemoteString() { return ("Hello Hai This IS Lalitha"); } } } project : ConsoleApplication code at : MyServerAppEx Program.cs using System; using System.Collections.Generic; using System.Text; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; namespace MyServerAppEx { class Program { static void Main(string[] args) { IChannel obj = new TcpChannel(8005); ChannelServices.RegisterChannel(obj,false); RemotingConfiguration.RegisterWellKnownServiceType(typeof(MyRemotingOb jectEx.MyRemotinClassEx),"myremotingobj",WellKnownObjectMode.Singleton); Console.WriteLine("Server IS Running"); Console.ReadLine(); }

}

} project : ConsoleApplication code at : MyProjectUsingRemoteObj Program.cs using System; using System.Collections.Generic; using System.Text; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; namespace MyProjectUsingRemoteObj { class Program { static void Main(string[] args) { TcpClientChannel ch = new TcpClientChannel(); ChannelServices.RegisterChannel(ch, false);

RemotingConfiguration.RegisterWellKnownClientType(typeof(MyRemotingObj ectEx.MyRemotinClassEx),"tcp://localhost:8005/myremotingobj"); MyRemotingObjectEx.MyRemotinClassEx myobj = new MyRemotingObjectEx.MyRemotinClassEx(); Console.WriteLine(myobj.GetRemoteString()); } } }

Related Documents

Remoting In Dotnet
July 2020 4
Dotnet Remoting
November 2019 17
Remoting In
November 2019 15
Remoting
November 2019 13
Remoting
November 2019 20
Remoting
November 2019 16