ChannelFactory.InitializeEndpoint Method

Definition

Initializes the service endpoint of the channel factory.

Overloads

InitializeEndpoint(String, EndpointAddress)

Initializes the service endpoint of the channel factory with a specified address and configuration.

InitializeEndpoint(Binding, EndpointAddress)

Initializes the service endpoint of the channel factory with a specified binding and address.

InitializeEndpoint(ServiceEndpoint)

Initializes the service endpoint of the channel factory with a specified endpoint.

Remarks

You must have an address to initialize an endpoint, but can have just the binding or configuration instead of the full endpoint.

InitializeEndpoint(String, EndpointAddress)

Initializes the service endpoint of the channel factory with a specified address and configuration.

C#
protected void InitializeEndpoint(string configurationName, System.ServiceModel.EndpointAddress address);

Parameters

configurationName
String

The name of the configuration file used to initialize the channel factory.

address
EndpointAddress

The EndpointAddress with which to initialize the channel factory.

Remarks

Use InitializeEndpoint(Binding, EndpointAddress) if you have just the binding.

Applies to

.NET Core 1.1 and other versions
Product Versions
.NET Core 1.0, Core 1.1
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
UWP 10.0

InitializeEndpoint(Binding, EndpointAddress)

Source:
ChannelFactory.cs
Source:
ChannelFactory.cs

Initializes the service endpoint of the channel factory with a specified binding and address.

C#
protected void InitializeEndpoint(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress address);

Parameters

binding
Binding

The Binding with which to initialize the channel factory.

address
EndpointAddress

The EndpointAddress with which to initialize the channel factory.

Remarks

Use InitializeEndpoint(String, EndpointAddress) if you have the configuration.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

InitializeEndpoint(ServiceEndpoint)

Source:
ChannelFactory.cs
Source:
ChannelFactory.cs

Initializes the service endpoint of the channel factory with a specified endpoint.

C#
protected void InitializeEndpoint(System.ServiceModel.Description.ServiceEndpoint endpoint);

Parameters

endpoint
ServiceEndpoint

The ServiceEndpoint to initialize the channel factory with.

Exceptions

endpoint is null.

Remarks

Use InitializeEndpoint(Binding, EndpointAddress) if you have just the binding. Use InitializeEndpoint(String, EndpointAddress) if you have the configuration.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0