Groups | Blog | Home
all groups > dotnet remoting > august 2005 >

dotnet remoting : What's the difference between Activator.GetObject(serverType,url) and RemotingServices.Connect(serverType,url)



Gustavo Guerra
8/21/2005 12:00:00 AM
Hello

Can some one explain me the difference between
Activator.GetObject(serverType,url) and
RemotingServices.Connect(serverType,url)? They seem to do exactly the same.

Best Regards,
Gustavo Guerra

Mona
8/24/2005 12:00:00 AM
Hi Gustavo,

Regarding this issue of the differences between teh Activator.GetObject and
RemotingServices.Connect, I would like to tell you that Activator.GetObject
Method creates a proxy for a well known object indicated by the specified
type and URL. The return value is a proxy that points to an end point served
by the requested well-known object. It calls the proxy to send the messages
to the remote object. No messages are sent over the network until a method
is called on the proxy.

The RemotingServices.Connect Method creates a proxy for a well known object,
given the Type such as class types, interface types, array types, value
types etc and the URL. It will return a proxy to a remote object that points
to an end point served by the specified well-known object. The returned
proxy object points to an end point served by the specified well known
object.

Hope this helps.

Regards,
Mona [Grapecity]

[quoted text, click to view]

Gustavo Guerra
8/25/2005 7:14:08 PM
So, the only difference is that Activator.GetObject doesn't send any message
over the network, only on first method call, but RemotingServices.Connect
does?

Regards
Gsutavo Guerra

[quoted text, click to view]

AddThis Social Bookmark Button