System.Runtime.Remoting.RemotingServices.SetObjectUriForMarshal Method

Sets the URI for the subsequent call to the RemotingServices.Marshal(MarshalByRefObject) method.

Syntax

public static void SetObjectUriForMarshal (MarshalByRefObject obj, string uri)

Parameters

obj
The object to set a URI for.
uri
The URI to assign to the specified object.

Remarks

The URI set by the current method is used when marshaling the given object.

After marshaling, the URI of the specified object is set to the string in the uri parameter appended onto the Guid of the current AppDomain.

If the current application is listening on an HTTP port, then both the string specified in the uri parameter and the uri string appended onto the Guid of the current AppDomain route to the specified object. For example, if the application is listening on HTTP port 9000, then both http://localhost:9000/objectUri, and http://localhost:9000/<appdomainguid>/objectUri route to the object specified in the obj parameter.

Requirements

Namespace: System.Runtime.Remoting
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0