Marshalling and types of marshalling, DOT NET Programming

Assignment Help:

What is marshalling and types of marshalling?

The Marshaling is used when an object is converted so that it can be sent across the network or across the application domains. The Unmarshaling generates an object from the marshaled data. There are 2 ways to do the marshalling:-

1) Marshal-by-value (MBV) :- In this type of marshalling the object is serialized into the channel, and a copy of the object is generated on the other side of the network. The object which is to marshal is stored into the stream, and the stream is used to build a copy of the object on the another side with the unmarshalling sequence.

2) Marshaling-by-reference (MBR):- Here it creates a proxy on the client which  is used to communicate with the remote object. The marshaling sequence of a remote object creates an ObjRef instance which itself can be serialized across the network.

The Objects that are derived from "MarshalByRefObject" are always marshaled by the reference.

To marshal a remote object the static method RemotingServices.Marshal() is used.RemotingServices.Marshal() has following overloaded versions:-

public static ObjRef Marshal(MarshalByRefObject obj)

 public static ObjRef Marshal(MarshalByRefObject obj, string objUri)

 public static ObjRef Marshal(MarshalByRefObject obj, string objUri,Type requestedType)

The very First argument obj specifies the object to marshal. The objUri is the path which is stored within the marshaled object reference; it can be used to access the remote object. The requestedType is used to pass a different type of the object to the object reference. This is very useful if the client using the remote object shouldn't use the object class but an interface that the remote object class implements instead. In this scenario the interface is the requestedType which must be used for the marshaling.


Related Discussions:- Marshalling and types of marshalling

Windows application for ildasm application, In this assignment you will cre...

In this assignment you will create a Windows application that mimic the ILDASM application. Your application should have at least the following features: 1. A multi-form applica

Object in dot net, What is an Object in Dot Net? This is the basic unit...

What is an Object in Dot Net? This is the basic unit of a system. An object is an entity that has identity, attributes, and behavior. The Objects are members of a class. The cl

XML, Write a XML with database with book details (BOOK ID, Title, Author, s...

Write a XML with database with book details (BOOK ID, Title, Author, subject, published Year, language, vendor, price)

Precautions for state server mode working, What are the precautions so that...

What are the precautions so that StateServer Mode work properly? Following are some points to remember so that StateServer Mode works properly:- a) StateServer mode session

What is machine.config, What is Machine.config?  Machine configuration ...

What is Machine.config?  Machine configuration file: The machine. config file have settings that apply to the entire computer. This file is located in the %runtime install path

Define cts, CTS(Common Type System) : In order that the two language commu...

CTS(Common Type System) : In order that the two language communicate smoothly CLR has CTS (Common Type System). Example in VB you have "Integer" and in C++ you have "long" these d

We are seeking mobile game develope, Project Description: We are seeking...

Project Description: We are seeking Mobile game developer for long time our budget is per project Skills required: Mobile Phone, .NET

Static chart diagrams, Describe all elements in Static Chart diagrams. ...

Describe all elements in Static Chart diagrams. Package: - The Package logically groups element of a UML model. Class: - The Class describes all set of objects with

What is full trust, What is Full Trust? Your code is permitted to do an...

What is Full Trust? Your code is permitted to do anything in the framework, meaning that all (.Net) permissions are granted. The GAC has Full Trust because it's on the local HD

What are standard query operators in linq, What are standard query operator...

What are standard query operators in LINQ? The standard query operators in LINQ are the extension process that forms the LINQ pattern. These operators form an API that enables

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd