UrlAttribute Constructor (String)

 

Creates a new instance of the UrlAttribute class.

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

[SecurityCriticalAttribute]
public UrlAttribute(
	string callsiteURL
)

Parameters

callsiteURL
Type: System.String

The call site URL.

Exception Condition
ArgumentNullException

The callsiteURL parameter is null.

SecurityException

The immediate caller does not have infrastructure permission.

The following code example illustrates the use of the UrlAttribute constructor.

// Create a url attribute object.
UrlAttribute attribute = 
    new UrlAttribute("tcp://localhost:1234/RemoteApp");
Console.WriteLine("UrlAttribute value: {0}", attribute.UrlValue);

SecurityPermission

For operating with infrastructure code. Associated enumeration: SecurityPermissionFlag.Infrastructure

.NET Framework
Available since 1.1
Return to top
Show: