.NET Framework Bookmark and Share   
 index > .NET Remoting and Runtime Serialization > Internals of remote object creation
 

Internals of remote object creation

Hi all,

When you have a code segment like the following:

ChannelServices.RegisterChannel(new TcpClientChannel());
RemotingConfiguration.RegisterWellKnownClientType(typeof(TransactionMaintenance), "tcp://localhost:1235/TransactionMaintenance");
this.transactionMaintenance = new TransactionMaintenance();

I wasn't able to find a link between the type registration and the object
instantiation.
If you inspect the IL for this code the object instantiation is done with a
newobj opcode just as would have been done for a local object.
How does the CLR know that it should instantiate a remote class instead of a
local one?

Thanks in advance.

Alfred Gary Myers Jr.
http://www.yuma.com.br
http://br.thespoke.net/MyBlog/alfred_myers/MyBlog.aspx
Alfred Myers
Magic. Smile

I think that Don's book covers this, but if you want the real inside scoop go download the Rotor source and take a look.

The short answer is that the CLR knows what types are registered for remote activation and acts according.
douglasp
Magic. Smile

I think that Don's book covers this, but if you want the real inside scoop go download the Rotor source and take a look.

The short answer is that the CLR knows what types are registered for remote activation and acts according.
douglasp
Hello Doug,

If my memory is refreshed, Is this "magic" happens in accordance with CLR, correctly? At remote object registration, can this "magic" change some internals (http://msdn.microsoft.com/msdnmag/issues/05/05/JITCompiler/default.aspx) of MethodTable to redirect to remote proxy ? I think this is an obvious way to work transparently with IL Opcode like newobj (ok, I look at some internals in Rotor too)...

Thanks
FABIOG

You can use google to search for other answers

Custom Search

More Threads

• Regarding Non-Serialization of a Delegate
• error in Deserialization
• Default formatter for IPCChannel
• Problem in Automatic Deserialization of Low typeFilterLevel
• Remoting crashes IIS
• SerializationException "The input stream is not a valid binary format" and sockets
• remoteable object instantiation
• serialization of Request object
• No Deserializer found to deserialize a ...
• How to control XML serialization of object properties?