Partilhar via


<endpoint> of <client>

Specifies contract, binding, and address properties of the channel endpoint, which is used by clients to connect to service endpoints on the server.

Schema Hierarchy

<system.serviceModel>
  <client>
    <endpoint> of <client>

Syntax

<endpoint address="String"
   behaviorConfiguration="String"
   binding="String"
   bindingConfiguration="String"
   contract="String"   endpointConfiguration=”String”   kind=”String”
   name="String"
</endpoint>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

address

Required string attribute.

Specifies the address of the endpoint. The default is an empty string. The address must be an absolute URI.

behaviorConfiguration

A string that contains the behavior name of the behavior to be used to instantiate the endpoint. The behavior name must be in scope at the point the service is defined. The default is an empty string.

binding

Required string attribute.

A string that indicates the type of binding to use. The type must have a registered configuration section in order to be referenced. The type is registered by section name, instead of by the type name of the binding.

bindingConfiguration

Optional. A string that contains the name of the binding configuration to be used when the endpoint is instantiated. The binding configuration must be in scope at the point the endpoint is defined. The default is an empty string.

This attribute is used in conjunction with binding to reference a specific binding configuration in the configuration file. Set this attribute if you are attempting to use a custom binding. Otherwise, an exception may be thrown.

contract

Required string attribute.

A string that indicates which contract this endpoint is exposing. The assembly must implement the contract type.

endpointConfiguration

A string that specifies the name of the standard endpoint that is set by the kind attribute, which references to the additional configuration information of this standard endpoint. The same name must be defined in the <standardEndpoints> section.

kind

A string that specifies the type of standard endpoint applied. The type must be registered in the <extensions> section or in machine.config. If nothing is specified, a common channel endpoint is created.

name

Optional string attribute. This attribute uniquely identifies an endpoint for a given contract. You can define multiple clients for a given Contract type. Each definition must be differentiated by a unique configuration name. If this attribute is omitted, the corresponding endpoint is used as the default endpoint associated with the specified Contract type. The default is an empty string.

The name attribute of a binding is used for definition export through WSDL.

Child Elements

Element Description

<headers>

A collection of address headers.

<identity>

An identity that enables the authentication of an endpoint by other endpoints exchanging messages with it.

Parent Elements

Element Description

<client>

A configuration section that defines a list of endpoints that a client can connect to.

Example

This is an example of a channel endpoint configuration.

<endpoint address="/HelloWorld/"
    bindingConfiguration="usingDefaults"
    name="MyBinding"
    binding="customBinding"
    contract="HelloWorld">
</endpoint>

See Also

Reference

ChannelEndpointElement
ClientSection
ChannelEndpointElementCollection
Endpoints
ChannelEndpointElement

Other Resources

WCF Client Configuration
Clients