Export (0) Print
Expand All

DuplexChannelFactory.CreateChannel Method (Object, Binding, EndpointAddress, Uri)

Creates a duplex channel between a service and a callback instance on the client.

Namespace: System.ServiceModel
Assembly: System.ServiceModel (in system.servicemodel.dll)

public static TChannel CreateChannel (
	Object callbackObject,
	Binding binding,
	EndpointAddress endpointAddress,
	Uri via
)
public static TChannel CreateChannel (
	Object callbackObject, 
	Binding binding, 
	EndpointAddress endpointAddress, 
	Uri via
)
public static function CreateChannel (
	callbackObject : Object, 
	binding : Binding, 
	endpointAddress : EndpointAddress, 
	via : Uri
) : TChannel
Not applicable.

Parameters

callbackObject

The Object that the client uses to listen for messages from the connected service.

binding

The Binding used to connect to the service by channels produced by the factory.

endpointAddress

The EndpointAddress that provides the location of the service.

via

The Uri that contains the transport address to which the message is sent.

Return Value

A channel of type TChannel, the generic parameter for the factory, between the client and service.

Exception typeCondition

ArgumentNullException

binding or endpointAddress is a null reference (Nothing in Visual Basic).

InvalidOperationException

callbackInstance or callbackInstance.UserObject is a null reference (Nothing in Visual Basic).

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft