IChannelFactory<TChannel>.CreateChannel Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a channel of a specified type to a specified endpoint address.
Overloads
CreateChannel(EndpointAddress) |
Creates a channel of a specified type to a specified endpoint address. |
CreateChannel(EndpointAddress, Uri) |
Creates a channel of a specified type to a specified endpoint address and transport address to which messages are sent. |
Remarks
Use the CreateChannel(EndpointAddress, Uri) overload to distinguish the address to which the message is initially sent from the ultimate destination when you want to do manual routing. Note that any channels created by this channel factory are closed when the channel factory is closed. For a discussion of addressing, see the Addresses topic.
CreateChannel(EndpointAddress)
- Source:
- IChannelFactory.cs
- Source:
- IChannelFactory.cs
Creates a channel of a specified type to a specified endpoint address.
public:
TChannel CreateChannel(System::ServiceModel::EndpointAddress ^ to);
public TChannel CreateChannel (System.ServiceModel.EndpointAddress to);
abstract member CreateChannel : System.ServiceModel.EndpointAddress -> 'Channel
Public Function CreateChannel (to As EndpointAddress) As TChannel
Parameters
The EndpointAddress that provides the location of the service.
Returns
A channel of type TChannel
to the specified endpoint address.
Remarks
Use the CreateChannel(EndpointAddress, Uri) overload to distinguish the address to which the message is initially sent from the ultimate destination when you want to do manual routing. Note that any channels created by this channel factory are closed when the channel factory is closed.
Applies to
CreateChannel(EndpointAddress, Uri)
- Source:
- IChannelFactory.cs
- Source:
- IChannelFactory.cs
Creates a channel of a specified type to a specified endpoint address and transport address to which messages are sent.
public:
TChannel CreateChannel(System::ServiceModel::EndpointAddress ^ to, Uri ^ via);
public TChannel CreateChannel (System.ServiceModel.EndpointAddress to, Uri via);
abstract member CreateChannel : System.ServiceModel.EndpointAddress * Uri -> 'Channel
Public Function CreateChannel (to As EndpointAddress, via As Uri) As TChannel
Parameters
The EndpointAddress that provides the location of the service.
Returns
A channel of type TChannel
to the specified endpoint address and transport address.
Remarks
The transport address specified by the via
is the location to which a message should initially be sent on its way to some other remote address specified by the to
at which the service is located. In most Internet scenarios, the via
URI is the same as the Uri of the final to
address of the service. You only distinguish between these two addresses when you want to do some kind of manual routing. Note that any channels created by this channel factory are closed when the channel factory is closed. For a discussion of addressing, see the Addresses topic.