Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ChannelServices::GetUrlsForObject Method (MarshalByRefObject^)

 

Returns an array of all the URLs that can be used to reach the specified object.

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

public:
[SecurityCriticalAttribute]
static array<String^>^ GetUrlsForObject(
	MarshalByRefObject^ obj
)

Parameters

obj
Type: System::MarshalByRefObject^

The object to retrieve the URL array for.

Return Value

Type: array<System::String^>^

An array of strings that contains the URLs that can be used to remotely identify the object, or null if none were found.

Exception Condition
SecurityException

The immediate caller does not have infrastructure permission.

array<String^>^myURLArray = ChannelServices::GetUrlsForObject( myHelloServer );
Console::WriteLine( "Number of URLs for the specified Object: {0}", myURLArray->Length );
for ( int iIndex = 0; iIndex < myURLArray->Length; iIndex++ )
   Console::WriteLine( "URL: {0}", myURLArray[ iIndex ] );

SecurityPermission

For operating with infrastructure code. Demand value: SecurityAction::LinkDemand; Permission value: SecurityPermissionFlag::Infrastructure

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft