Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

RemotingServices.GetObjectUri Method

Retrieves the URI for the specified object.

Namespace:  System.Runtime.Remoting
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Shared Function GetObjectUri ( _
	obj As MarshalByRefObject _
) As String

Parameters

obj
Type: System.MarshalByRefObject

The MarshalByRefObject for which a URI is requested.

Return Value

Type: System.String
The URI of the specified object if it has one, or Nothing if the object has not yet been marshaled.

ExceptionCondition
SecurityException

The immediate caller does not have infrastructure permission.

' GetRealProxy, GetObjectUri, GetEnvoyChainForProxy 
Dim proxy As RealProxy = RemotingServices.GetRealProxy(obj)
Console.WriteLine("Real proxy type: {0}", proxy.GetProxiedType().ToString())

Console.WriteLine("Object URI: {0}", RemotingServices.GetObjectUri(obj).ToString())

Dim msgSink As IMessageSink = RemotingServices.GetEnvoyChainForProxy(obj).NextSink

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Show:
© 2015 Microsoft