write a example for remoting (code)

Answers were Sorted based on User's Feedback



write a example for remoting (code)..

Answer / arunkumar thimma

public class CommonClass : MarshalByRefObject
{

public string FirstName;

public string LastName;

public string GetWelcomeString()
{
Console.WriteLine("Welcome " + FirstName + " " + LastName);
return "Welcome " + FirstName + " " + LastName;
}

}

Is This Answer Correct ?    1 Yes 0 No

write a example for remoting (code)..

Answer / arunkumar thimma

static void Main(string[] args)
{
TcpChannel tcpChannel = new TcpChannel(8084);
ChannelServices.RegisterChannel(tcpChannel);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(ClassLibrary1.CommonClass),
"testRemoting", WellKnownObjectMode.Singleton);
Console.WriteLine("Server is ready");
Console.ReadLine();
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Remoting Interview Questions

About Iunknown interface Queue ,its methods Query Interface Addref,Release and Explain each ?

0 Answers   DELL,


Hello, I want to connect a system in LAN and i want to access that.When ever i am moving a mouse in my desktop the similar thing have to happend in the another system in which i have connected. I need coding for this in c# and .NET . any one please help me.It is very urgent to me Advance thanks. my email id:manojkumarchallagundla@gmail.com

0 Answers   Excel,


What is the difference between the RegisterWellknownServiceType(), RegisterWellknownClientType(), RegisterActivatedServiceType() and RegisterActivatedClientType() in .net?

0 Answers  


How are the activation URLs different in case of SAO and CAO in .NET remoting?

0 Answers  


What is boxing and unboxing ?

4 Answers   Amdocs, BirlaSoft, TCS,






What do you mean by passport authentication and windows authentication ?

5 Answers   TCS,


What is the purpose of strong name?

0 Answers  


What is unmanaged code?

0 Answers  


What are the ways to configure remoting objects before client can use them?

0 Answers  


Which Namespaces is used to achieve the Remoting?

0 Answers  


How can objects in two diff. App Doimains communicate with each other ?

1 Answers  


What are different types of assemblies?

0 Answers  


Categories