ChannelFactory<TChannel>.CreateChannel Method (EndpointAddress, Uri)

Creates a channel that is used to send messages to a service at a specific endpoint address through a specified transport address.

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

public virtual TChannel CreateChannel(
	EndpointAddress address,
	Uri via
)

Parameters

address
Type: System.ServiceModel.EndpointAddress
The EndpointAddress that provides the location of the service.
via
Type: System.Uri
The Uri that contains the transport address to which the channel sends messages.

Return Value

Type: TChannel
The TChannel of type IChannel created by the factory.

Implements

IChannelFactory<TChannel>.CreateChannel(EndpointAddress, Uri)

ExceptionCondition
ArgumentNullException

address is null.

InvalidOperationException

The ChannelFactory has duplex operations it does not support.

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

This member is present but is not supported on Windows Phone.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: