IChannelReceiver.GetUrlsForUri Method (String)

 

Returns an array of all the URLs for a URI.

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

[SecurityCriticalAttribute]
string[] GetUrlsForUri(
	string objectURI
)

Parameters

objectURI
Type: System.String

The URI for which URLs are required.

Return Value

Type: System.String[]

An array of the URLs.

Exception Condition
SecurityException

The immediate caller does not have infrastructure permission.

This method is used by the ChannelServices.GetUrlsForObject method.

// Create and send the object URL.
public string[] GetUrlsForUri(string objectURI)
{
   string[] myString = new string[1];
   myString[0] = Dns.Resolve(Dns.GetHostName()).AddressList[0]
                                                      + "/" + objectURI;
   return myString;
}

SecurityPermission

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

.NET Framework
Available since 1.1
Return to top
Show: