Direct Remoting

There are a number of situations in which you will want to use the remoting infrastructure directly, especially in combination with extensions to the remoting infrastructure. For example, if you want to publish a particular object at a particular URL, you call RemotingServices.Marshal and pass the object, the Uniform Resource Identifier (URI) you want to use for that object, and optionally the Type that represents the type information that will be exposed to the client. At any time, you can revoke publication of that object by calling RemotingServices.Disconnect, passing the object reference. You can then republish the same object at another URI. You can easily use this method to publish an object that you completely control at all times.

If you want to obtain a reference to a remote object from a client, you can go through the registration routines or you can simply call RemotingServices.Connect to acquire a proxy to a server-activated object. For a simple example of this, see Remoting Example: Dynamic Publication.

See Also

CallContexts and Direct Remoting | Advanced Remoting | Remoting Example: Dynamic Publication | RemotingServices.Marshal Method | RemotingServices.Connect Method