This documentation is archived and is not being maintained.

UrlAttribute Class

Defines an attribute that can be used at the call site to specify the URL where the activation will happen. This class cannot be inherited.

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

'Declaration
<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class UrlAttribute
	Inherits ContextAttribute
'Usage
Dim instance As UrlAttribute

/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class UrlAttribute extends ContextAttribute
SerializableAttribute 
ComVisibleAttribute(true) 
public final class UrlAttribute extends ContextAttribute

The UrlAttribute is passed in the activation attributes array as a parameter to Activator.CreateInstance when creating activated objects with the CreateInstance method.

For more information about using attributes, see Extending Metadata Using Attributes.

The following code example illustrates the use of the UrlAttribute in setting up client-activated remoting. The example contains three parts: a client, a server, and a remote object that is used by the client and server.

The following code example shows a client:

No code example is currently available or this language may not be supported.

The following code example shows a server for this client:

No code example is currently available or this language may not be supported.

The following code example shows the remote object that is used by the client and the server:

No code example is currently available or this language may not be supported.

System.Object
   System.Attribute
     System.Runtime.Remoting.Contexts.ContextAttribute
      System.Runtime.Remoting.Activation.UrlAttribute

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: