Explain Marshalling and its types in .Net Remoting.- Objects can't be transmitted as such over communication channel. The objects are packed into message buffer before transmitted. This process is called marshalling.
- There are two different ways to Marshal objects :
1. Marshal by Value :
Server creates copy of the remoting object's state and passes it to the client. You need to implement your classes to have marshal by value features either by implementing ISerializable interface or using attribute. Here you need to copy whole object to the client which means with large size object, the communication overhead is significant.
2. Marshal by Reference :
In this type proxy is created by the reference of the server objects. Class must extend the System.MarshalByRefObject to implement marshal by reference. Here, client keeps server object reference which means round trip to server with each method call.