title | description | ms.date | dev_langs | ms.assetid | ||
---|---|---|---|---|---|---|
How to: Use the ChannelFactory |
Learn how to create a channel factory to create more than one channel for accessing services by using a WCF client. |
03/30/2017 |
|
d48f01b5-582b-4c8b-b547-8adddae7e371 |
The generic xref:System.ServiceModel.ChannelFactory%601 class is used in advanced scenarios that require the creation of a channel factory that can be used to create more than one channel.
-
Build and run an Windows Communication Foundation (WCF) service. For more information, see Designing and Implementing Services, Configuring Services, and Hosting Services.
-
Use the ServiceModel Metadata Utility Tool (Svcutil.exe) to generate the contract (interface) for the client.
-
In the client code, use the xref:System.ServiceModel.ChannelFactory%601 class to create multiple endpoint listeners.
[!code-csharpc_HowToUseChannelFactory#1] [!code-vbc_HowToUseChannelFactory#1]