CreateChannel Method (EndpointAddress, Uri)
Collapse the table of content
Expand the table of content

ChannelFactoryBase(Of TChannel).CreateChannel Method (EndpointAddress, Uri)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Creates a particular type of channel with specified transport and endpoint addresses.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

'Declaration
Public Function CreateChannel ( _
	address As EndpointAddress, _
	via As Uri _
) As TChannel

Parameters

address
Type: System.ServiceModel.EndpointAddress
The EndpointAddress of the remote endpoint to which the channel sends messages.
via
Type: System.Uri
The Uri that contains the transport address to which messages are sent on the output channel.

Return Value

Type: TChannel
A channel of type TChannel with the specified remote and transport addresses.

Implements

IChannelFactory(Of TChannel).CreateChannel(EndpointAddress, Uri)

ExceptionCondition
ArgumentNullException

address or via is Nothing.

This method calls OnCreateChannel(EndpointAddress, Uri) when invoked.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft