ChannelFactory<TChannel> Constructor (Binding, EndpointAddress)

Initializes a new instance of the ChannelFactory<TChannel> class with a specified endpoint address and binding configuration.

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

public ChannelFactory(
	Binding binding,
	EndpointAddress remoteAddress
)

Parameters

binding
Type: System.ServiceModel.Channels.Binding
The Binding used to configure the channels created by the factory.
remoteAddress
Type: System.ServiceModel.EndpointAddress
The destination EndpointAddress for channels created by the factory.

ExceptionCondition
ArgumentNullException

The binding is null.


            //Create a request channel specifying a remote endpoint address
            EndpointAddress address3 = new EndpointAddress("http://localhost:8000/ChannelApp");
            ChannelFactory<IRequestChannel> factory3 = new ChannelFactory<IRequestChannel>("MyEndpointConfig");
            factory3.CreateChannel(address3);



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: