| Back to Questions Page |
| |
| Question |
In which conditions do you opt for Remoting services? |
Rank |
Answer Posted By |
|
Question Submitted By :: Swapna |
| This Interview Question Asked @ Tech-Mahindra , Manland |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | If client and server belongs to same operation system then
we have to go with remoting services..............  |
| Krishna |
| |
| |
| Answer | when the word iteranet comes in pic we should prifer 2 use
with condistion that saring with lot of pc  |
| Sisir |
| |
| |
| Answer | if the two systems are in dotnet platform  |
| Prasad |
| |
| |
|
|
| |
| Answer | I don't know what Sisir is talking about... Remoting is
something like web services. You might decide to opt for
Remoting instead of web services in following cases...
1) Client and server platform is fixed
2) Protocol is NOT fixed. (Like web services strictly work
on HTTP protocol)
3) Where object serialization is to be done strictly
through CLR.
4) Where platform is fixed i.e. .Net framework.  |
| Maruti Tathe |
| |
| |
| Answer | when both the server and client r under our control then we
use .net remoting.  |
| Veera |
| |
| |
| Answer | Remoting can be prefered
1. Both server and Client sit in different machine.
2. Both server and client are .NET applications
3. The state of the objects transfered accross the network
should be maintained.
4. The objects of the IDictionary interface should be
transfered accross the network.  |
| Vaidyanathan R |
| |
| |
| Question |
What are the differences between Marshal by value and
Marshal by reference? |
Rank |
Answer Posted By |
|
Question Submitted By :: Swapna |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Marshal-by-value objects are copied by the remoting system
and passed in their entirety to the caller's application
domain. Once copied to the caller's application domain (by
the marshaling process), all method calls and property
accesses are executed entirely within that domain. The
entire object exists in the caller's domain, so there is no
need to marshal accesses across domain boundaries. Using
marshal-by-value objects can increase performance and
reduce network traffic when used for small objects or
objects to which you will be making many accesses. However,
because the object exists entirely in the caller's
application domain, no state changes to the object are
communicated to the originating application domain, or from
the originator back to the caller. Marshal-by-value is not
a good choice for very large objects with many accesses. It
makes little sense to marshal an entire large object across
domain boundaries when all you need is access to a single
field, method, or property.  |
| J's |
| |
| |
| Answer | Remoting makes an object in one process (the server)
available to code in another process (the client). This is
called marshalling, and there are two fundamentally
different ways to marshal an object
-->Marshal by value: the server creates a copy of the
object passes the copy to the client.
-->Marshal by reference: the client creates a proxy for the
object and then uses the proxy to access the object.  |
| Rashmi Tiwari |
| |
| |
| Question |
How to perform Remoting? |
Rank |
Answer Posted By |
|
Question Submitted By :: Swapna |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Remoting Performance and Auto Web Proxy .
The .Net Framework 2.0 has significant changes to its
support for proxies including support for connection-
specific proxy settings, automatic proxy configuration and
the ability to automatically refreshing proxy settings
whenever the active connection changes. These features can
be very useful in .Net Remoting but the auto web proxy
feature can also affect performance. If you do not need
these settings in your client it might be useful to disable
them.
There are a number of ways to disable this:
1. In Internet Explorer Open Internet Options,
(either through control panel or the Internet Explorer™
tools menu), switch to the connections tab, and select LAN
settings. Clear all checkboxes under automatic
configuration. This will disable automatic proxy settings
for the current user (note that this will not work for
ASP.NET sites making outgoing web service calls because
they run under a different user).
2. Imperatively disable it by setting
System.Net.WebRequest.DefaultWebProxy = null;
3. In your config file bypass the proxy for your web-
server. You can also disable the default proxy altogether.  |
| Ramakrishna Pidugu |
| |
| |
| Question |
When we use web service and when we use Remoting? |
Rank |
Answer Posted By |
|
Question Submitted By :: Swapna |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | .NET remoting is specifically used when you are using only
Microsoft platform. Remoting cannot be used between .net
client and non .NET clients.
Web services though can be used for communication on
MIcrosoft technologies, but their main feature is Platform
Interoperability.
So if you are using client and server supporting .NET
framwork, iwould recommend to use .NET remoting because
you can customise it to great detail and also its faster.
If you are developing for cross platform technologies, you
cannot use .NET remoting. So the only option you have is ot
use web services  |
| Ankit Dass |
| |
| |
| Answer | WebService is Platform,Object ,Programming Language
indepedent while remoting depends on platform means client
to be built using .NET Framework or other framework that
supports .NET Remoting
webservice can be accessed on http protocol and soap based
message formating while remoting supports tcp/http with
binary and soap based formating.
webservice is based on singlecall method means for every
request remote object is loaded, while remoting supports
singlecall and singleton method.
webservice lies under unbrella of Remoting.  |
| Ganesh |
| |
| |
| Question |
Choosing between HTTP and TCP for protocols and Binary and
SOAP for formatters, what are the trade-offs? In what way
it is best? |
Rank |
Answer Posted By |
|
Question Submitted By :: Swechcha |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Binary over TCP is the most effiecient, SOAP over HTTP is
the most interoperable.  |
| Sathiya |
| |
| |
| Question |
How does assembly versioning in .NET prevent DLL Hell? |
Rank |
Answer Posted By |
|
Question Submitted By :: Swechcha |
| This Interview Question Asked @ Satyam |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Using Zero impact deployment in .Net to prevent the DLL
Hell Proplem.  |
| Sathiya |
| |
| |
| Answer | here is the answer : : :
The runtime checks to see that only one version of an
assembly is on the machine at any one time.
.NET allows assemblies to specify the name AND the version
of any assemblies they need to run.
The compiler offers compile time checking for backward
compatibility.
It doesn.t.  |
| Sivaraj.t |
| |
| |
| Question |
How do you directly call a native function exported from a
DLL? |
Rank |
Answer Posted By |
|
Question Submitted By :: Swechcha |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Yes we can call a native function exported from a Dll in
the following way,
I used C#.Net for Coding.
Add a Namespace that "System.Runtime.InteropServices"
Then use the following code,
Syntax:
[DllImport("dllname")]
here place the function in "dllname" Dll.  |
| Moghan |
| |
| |
| Answer | HERE IS THE CODE EXAMPLE :
using System.Runtime.InteropServices; \
class C
{
[DllImport("user32.dll")]
public static extern int MessageBoxA(int h, string
m, string c, int type);
public static int Main()
{
return MessageBoxA(0, “Hello
World!”, “Caption”, 0);
}
}  |
| Santhanakumar |
| |
| |
| Question |
Can you configure a .NET Remoting object via XML file? |
Rank |
Answer Posted By |
|
Question Submitted By :: Swapna |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Yes, via machine.config and application level .config file
(or web.config in ASP.NET). Application-level XML settings
take precedence over machine.config.  |
| Venu |
| |
| |
| Question |
What's the difference btw the following methods in .NET
remoting?
RegisterWellknownServiceType()
RegisterWellknownClientType()
RegisterActivatedServiceType()
RegisterActivatedClientType()
|
Rank |
Answer Posted By |
|
Question Submitted By :: Swapna |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | RegisterWellknownServiceType():
Method used to define and configure a remotable Object that
needs to be Activated on server side. This takes 3
parameter as follows:-
RegisterWellKnownServiceType( typeof( <Class/Object
Name> ), <"SomeURI">,
WellKnownObjectMode.Singleton/SingleCall );
RegisterWellknownClientType():
This method has to be used on the client module to
comunicate with serve-side activated remote object. Ex:
RegisterWellKnownClientType( typeof( <Class/Object Name> ),
<"Server Remotable Object URL"> );
RegisterActivatedServiceType():
RegisterActivatedClientType():
Similarly, the above two methods are used to define
remotable object type as client activated.  |
| Anil Kumar Mudajja |
| |
| |
| Question |
About sn.exe ? |
Rank |
Answer Posted By |
|
Question Submitted By :: Deepa |
| This Interview Question Asked @ MMTS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | strong Name is the process of assinging the storng name to
the shared assembly.  |
| Ravinjaypee |
| |
| |
| Answer | sn.exe is a command line .Net tool that is used to create
Strong Name. Different options are provided with this tool
to Delete, Verify, generate etc public key pairs. That can
be further used to register a .Net assembly.  |
| Maruti Tathe |
| |
| |
| Question |
About .NET Remoting and types of remoting ? |
Rank |
Answer Posted By |
|
Question Submitted By :: Deepa |
| This Interview Question Asked @ MMTS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | 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.  |
| Mohan |
| |
| |
| Answer | 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  |
| Praveen |
| |
| |
| Question |
What are static assemblies and dynamic assemlies.
Differences between them ? |
Rank |
Answer Posted By |
|
Question Submitted By :: Wgk |
| This Interview Question Asked @ TCS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Static assemblies are stored on disk.But dynamic assemblies
are directley loaded from memory.  |
| Pravallika |
| |
| |
| Question |
What is a process ? |
Rank |
Answer Posted By |
|
Question Submitted By :: Wgk |
| This Interview Question Asked @ TCS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Process is set of task of an running application or an
application itself, getting executed on a OS for which
memory is allocated by OS.  |
| Anil Kumar Mudajja |
| |
| |
| Answer | It’s an application that’s running and had been allocated
memory  |
| Bg |
| |
| |
| Answer | Processes are independent execution units that contain
their own state information, use their own address spaces,
and only interact with each other via interprocess
communication mechanisms (generally managed by the
operating system).  |
| Tdotnet |
| |
| |
| Answer | process is a basic unit for which operating system allocates
processor time.  |
| Saubhagya |
| |
| |
|
| |
|
Back to Questions Page |