System.Runtime.Remoting.RemotingConfiguration.RegisterActivatedServiceType Method

Registers a specified object type on the service end as a type that can be activated on request from a client.

Syntax

public static void RegisterActivatedServiceType (Type type)

Parameters

type
The Type of object to register.

Remarks

To create an instance of a client-activated object on the server, you must know its Type and it must be registered on the server end by using the RemotingConfiguration.RegisterActivatedServiceType(Type) method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with System.Runtime.Remoting.Channels.ChannelServices and then activate the object by calling new or Activator.CreateInstance(Type, System.Reflection.BindingFlags, System.Reflection.Binder, Object[], System.Globalization.CultureInfo).

To activate a client-activated object type with the new keyword, you must first register the object type on the client end using the RemotingConfiguration.RegisterActivatedClientType(Type, string) method. Calling the RemotingConfiguration.RegisterActivatedClientType(Type, string) method gives the remoting infrastructure the location of the remote application, where new attempts to create it. If, on the other hand, you use the Activator.CreateInstance(Type, System.Reflection.BindingFlags, System.Reflection.Binder, Object[], System.Globalization.CultureInfo) method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the Activator.CreateInstance(Type, System.Reflection.BindingFlags, System.Reflection.Binder, Object[], System.Globalization.CultureInfo) method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the System.Runtime.Remoting.Activation.UrlAttribute class.

For a detailed description of client-activated objects, see [<topic://cpconClientActivation>].

Requirements

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