Top 20 Dot Net Remoting Interview Questions You Must Prepare 02.Mar.2024

Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperable.

Yes, via machine.config and application level .config file (or web.config in ASP.NET). Application-level XML settings take precedence over machine.config.

Use remoting for more efficient exchange of information when you control both ends of the application. Use Web services for open-protocol-based information exchange when you are just a client or a server with the other end belonging to someone else.

.NET Remoting is a distributed objects infrastructure. It allows processes to share objects—to call methods on and access properties of objects that are hosted in different application domains within the same process, different processes executing on the same computer, on computers on an intranet, or on computers distributed over wide areas. .NET Remoting supports many different communications protocols, including the SOAP/HTTP protocol used by ASP.NET Web services. Support for other protocols makes it possible to provide much faster communications in .NET Remoting than would be possible with ASP.NET Web services.

The ASP.NET programming model is tied specifically to IIS, and is limited to creating Web services that use the producer/consumer model. .NET Remoting, on the other hand, can share objects from any type of application.The .NET Remoting system, as an integral part of the .NET Framework, supports full .NET type system fidelity. You can pass any object across the wire to a client. This is in contrast to ASP.NET, which is limited to data types that can be expressed with WSDL and XSD.

In the general sense, a proxy is any object that stands in for another, either servicing requests directly or passing the requests on to the object for which it is standing in. In .NET Remoting, the proxy manages the marshaling process and the other tasks required to make cross-boundary calls. The .NET Remoting infrastructure automatically handles creation and management of proxies, although it is possible to create your own proxy classes to plug in to and customize proxy creation, marshaling, and other proxy-related tasks.

.NET Remoting provides a powerful and high performance way of working with remote objects. Architecturally, .NET Remote objects are a perfect fit for accessing resources across the network without the overhead posed by SOAP based WebServices. .NET Remoting is easier to use than Java’s RMI, but definately more difficult than creating a WebService.

When any object is to be sent across the trport channel, it must be serialized and packed into a data format that can be trmitted with the wire. On the other end of the wire, this serialized data is read and deserialized back to the actual object. This Serialization is done by message-serialization formatters which convert the field or object’s state into a format that is helpful for storage or trmission. Dot Net framework provides us two message-serialization formatters one of them is a binary serialization formatter which converts an object’s state into a binary stream and other is SOAP serialization formatter which converts it into an XML string representation that’s human readable. The binary serialization formatter much slightly faster.

Remote objects are accessed through Channels. Channels physically trport the messages to and from remote objects. There are two existing channels TcpChannel and HttpChannel. Their names give away the protocols that they use. In addition, the TcpChannel or HttpChannel can be extended, or a new channel created if you determine the existing channels do not meet your needs.

Security is of paramount importance to any distributed application. Although the .NET Remoting infrastructure does not define any security features itself, because distributed applications are managed code they have full access to all of the .NET security features. In addition, the HTTP channel, when used with IIS, allows you to take full advantage of the authentication and authorization features that are available to Web based protocols. If you choose to use a protocol other than HTTP with IIS, then you have the opportunity to create your own security infrastructure.

.NET Remoting and ASP.NET Web Services. If we talk about the Framework Class Library, noteworthy classes are in System.Runtime.Remoting and System.Web.Services.

None. Security should be taken care of at the application level. Cryptography and other security techniques can be applied at application or server level.

.NET Remoting exposes objects to other application domains as if they are local, with a few exceptions. The two exceptions most likely to trip you up are:
• Static members are never remoted. Remoting always deals with some form of object instance member.
• Private methods are never remoted. You cannot wrap and pass a delegate to a private method.
This includes remote event handlers. The other exceptions are less likely to cause you trouble. The online documentation provides a complete list and explanation of the exceptions.

Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed.

In the past interprocess communication between applications was handled through Distributed COM, or DCOM. DCOM works well and the performance is adequate when applications exist on computers of similar type on the same network. However, DCOM has its drawbacks in the Internet connected world. DCOM relies on a proprietary binary protocol that not all object models support, which hinders interoperability across platforms. In addition, have you tried to get DCOM to work through a firewall? DCOM wants to communicate over a range of ports that are typically blocked by firewalls.

There are a ways to get it to work, but they either decrease the effectiveness of the firewall (why bother to even have the firewall if you open up a ton of ports on it), or require you to get a firewall that allows support for binary traffic over port 8@.NET Remoting eliminates the difficulties of DCOM by supporting different trport protocol formats and communication protocols. This allows .NET Remoting to be adaptable to the network environment in which it is being used.

Channels represent the objects that trfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box. A channel must exist before an object can be trferred.

By implementing ILease interface when writing the class code.

.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. The applications can be located on the same computer, different computers on the same network, or even computers across separate networks.

A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.

Distributed Computing Environment/Remote Procedure Calls (DEC/RPC), Microsoft Distributed Component Object Model (DCOM), Common Object Request Broker Architecture (CORBA), and Java Remote Method Invocation (RMI).