ChannelFactory<TChannel>.CreateChannel Method (EndpointAddress, Uri)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
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)
Syntax
'Declaration
Public Overridable Function CreateChannel ( _
address As EndpointAddress, _
via As Uri _
) As TChannel
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.
Implements
IChannelFactory<TChannel>.CreateChannel(EndpointAddress, Uri)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | address is nulla null reference (Nothing in Visual Basic). |
InvalidOperationException | The ChannelFactory has duplex operations it does not support. |
Remarks
Platform Notes
Silverlight for Windows Phone
This member is present but is not supported on Windows Phone.
Version Information
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
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also