Export (0) Print
Expand All

ChannelFactory.CreateChannel Method ()

Creates a channel of a specified type to a specified endpoint address.

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

public TChannel CreateChannel ()
public TChannel CreateChannel ()
public function CreateChannel () : TChannel
Not applicable.

Return Value

The TChannel of type IChannel created by the factory.

Creates a channel of type TChannel, the generic parameter for the class.

IChannelFactory<IRequestChannel> factory = binding.BuildChannelFactory<IRequestChannel>(bindingParams);
factory.Open();
EndpointAddress address = new EndpointAddress("http://localhost:8000/ChannelApp");
IRequestChannel channel = factory.CreateChannel(address);
channel.Open();

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