System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownClientType Method

Registers an object Type on the client end as a well-known type that can be activated on the server, using the given parameters to initialize a new instance of the System.Runtime.Remoting.WellKnownClientTypeEntry class.

Syntax

public static void RegisterWellKnownClientType (Type type, string objectUrl)

Parameters

type
The object Type.
objectUrl
URL of a well-known client object.

Remarks

Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with System.Runtime.Remoting.Channels.ChannelServices, and activating the object by calling new or Activator.GetObject(Type, string). To activate a well-known object with new, you must first register the well-known object type on the client using the RemotingConfiguration.RegisterWellKnownClientType(Type, string) method. Calling the RemotingConfiguration.RegisterWellKnownClientType(Type, string) method gives the remoting infrastructure the location of the remote object, which allows the new keyword to create it. If, on the other hand, you use the Activator.GetObject(Type, string) method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary.

For a detailed description of well-known objects, see [<topic://cpconServerActivation>].

Requirements

Namespace: System.Runtime.Remoting
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0