RemotingServices.Connect Method (Type, String, Object)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Creates a proxy for a well-known object, given the Type, URL, and channel-specific data.

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

public static object Connect(
	Type classToProxy,
	string url,
	object data


Type: System.Type

The Type of the well-known object to which you want to connect.

Type: System.String

The URL of the well-known object.

Type: System.Object

Channel specific data. Can be null.

Return Value

Type: System.Object

A proxy that points to an endpoint that is served by the requested well-known object.

Exception Condition

The immediate caller does not have permission to configure remoting types and channels.

The returned proxy object points to an endpoint served by the specified well-known object. No messages are sent over the network until a method is called on the proxy.

The data object is used to communicate information to the channel, and is passed to the IChannelSender.CreateMessageSink method.


for configuration of the remoting infrastructure. Demand value: SecurityAction.LinkDemand; Permission value: SecurityPermissionFlag.RemotingConfiguration

.NET Framework
Available since 1.1
Return to top