ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net Remoting
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
About .NET Remoting and types of remoting ?
 Question Submitted By :: Deepa
I also faced this Question!!     Rank Answer Posted By  
 
  Re: About .NET Remoting and types of remoting ?
Answer
# 1
Remoting allows two processes, a Server and a Client, to 
communicate in the same system, the same network or across 
networks. It allows applications in the same or different 
domains to inter-communicate. This article discusses the 
concept of Remoting in .NET with a simple example using C#.

Local and Remote Objects

In Remoting, a local object is one that is confined to the 
same application domain in which it is created. The object 
is considered Remote if it resides in a different 
application domain and can be invoked remotely by abiding 
by some pre-defined protocols. A Remote object inherits 
from the class MarshalByRefObject.

Channels

Channels are used to establish communications between 
a .NET Server and a .NET Client. Channels are a means of 
message communication between a Server and a Client process 
in .NET Remoting. Each channel is associated with a 
specific port. The clients access the Remote objects using 
channels. Channels can be of the following types:

· Http Channel

· Tcp Channel

Formatters

Formatters are responsible for encoding and decoding 
messages that are transmitted between the server and the 
client's application domains using these Channels. There 
are two formatters:

· Binary Formatter

· SOAP Formatter

The respective formatter classes for the above formatters 
are:

System.Runtime.Serialization.Formatters.Binary.BinaryFormatt
er

System.Runtime.Serialization.Formatters.Soap.SoapFormatter

Remoting in action

In .NET Remoting we have three components, a Server class 
that extends the class MarshalByRefObject, a client class 
and a proxy. The client does not call a server’s method 
directly. Instead, it invokes the method on the proxy. The 
client channel object actually sends a message to the 
remote channel object. A formatter on the client’s 
application domain then encodes the message and passes the 
same through the transport channel onto the server’s 
application domain. The message is decoded by a formatter 
on the server’s application domain and then the appropriate 
server’s method is called on the object being invoked. 
After the method completes its execution, the results are 
returned back to the client.

Passing Objects in Remoting

In Remoting, objects are passed from the server to the 
client or vice-versa using a process known as Marshalling. 
Marshalling can be of the following two types:

· Marshal by reference

· Marshal by value

In Marshall by reference, a proxy of the server’s object is 
created in the client’s application domain. In Marshal by 
value however, the server creates a copy of the remote 
object and sends the same to the client. In order to 
implement Marshal by reference, the class should extend the 
class MarshalByRefObject. To implement Marshal by value 
however, you should implement the ISerializable interface 
or specify the keyword Serializable attribute when 
declaring the class. Marshal by value classes are also 
known as unbound classes and do not have a remote identity. 
The MarshalByRefObjects are also known as application 
domain-bound or context-bound objects.

Types of Remote Objects

The following are the types of Remote Objects:

· Client Activated

· Server Activated

A client-activated Remote Object is one which is 
instantiated by a client and whose lifetime is determined 
by a client. The object is alive as long as its services 
are required by the client. A server-activated Remote 
Object is one whose lifetime is determined by the remote 
object. Activation modes of the Server Activated Remote 
Objects can be of the following two types:

· Single Call Activation Mode

· Singleton Activation Mode

The Single Call Activation mode is stateless and can handle 
only one client request at any time. For each request a new 
object is created and after the request is serviced the 
object is marked as garbage and it is subject to garbage 
collection. The Singleton Activation mode is not stateless 
so it can serve multiple clients.
 
Is This Answer Correct ?    11 Yes 0 No
Mohan
 
  Re: About .NET Remoting and types of remoting ?
Answer
# 2
NET Remoting is an enabler for application communication. 
It is a generic system for different applications to use to 
communicate with one another. .NET objects are exposed to 
remote processes, thus allowing interprocess communication
 
Is This Answer Correct ?    0 Yes 1 No
Praveen
 
 
 

 
 
 
Other Dot Net Remoting Interview Questions
 
  Question Asked @ Answers
 
How do you register a .NET assembly? Microsoft2
What is strong name and what is the need of it ? Digital-GlobalSoft1
How can you automatically generate interface for the remotable object in .NET with Microsoft tools? Tavant-Technologies1
What are the security issues if we send a query from the application? Microsoft1
What is a Windows process?  1
How to register a shared assembly ? Digital-GlobalSoft1
What is strong name and what is the purpose of strong name ? TCS4
Explain what is the relationship between a Process, Application Domain, and Application?  2
What is ODP.NET? Microsoft1
What are static assemblies and dynamic assemlies. Differences between them ? TCS2
What is a formatter?  2
Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?  1
How can you create a strong name for a .NET assembly?  2
Which namespace is used for encryption ? Digital-GlobalSoft2
What is a strong name?  1
How can you tell the application to look for assemblies at the locations other than its own install?  1
How do you directly call a native function exported from a DLL?  2
What distributed process frameworks outside .NET do you know?  1
What are the differences between Marshal by value and Marshal by reference? Verizon3
Give the Hierarchial description of remoting? Satyam1
 
For more Dot Net Remoting Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com