<webHttpEndpoint>

This configuration element defines a standard endpoint with a fixed <webHttpBinding> binding that automatically adds the <webHttp> behavior. Use this endpoint when writing a REST service.

<configuration>
  <system.serviceModel>
    <standardEndpoints>
      <webHttpEndpoint>

Syntax

<system.serviceModel>
  <standardEndpoints>
    <webHttpEndpoint>
      <standardEndpoint automaticFormatSelectionEnabled="String"
                        defaultOutgoingResponseFormat="Xml/Json"
                        helpEnabled="Boolean"
                        webEndpointType="String" />
    </webHttpEndpoint>
  </standardEndpoints>
</system.serviceModel>

Attributes and Elements

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

Attributes

Attribute Description
automaticFormatSelectionEnabled A Boolean value that indicates whether automatic format selection is enabled.

When automatic format selection is enabled, the infrastructure parses the Accept header of the request message and determines the most appropriate response format. If the Accept header does not specify a suitable response format, the infrastructure uses the Content-Type of the request message or the default response format of the operation.
defaultOutgoingResponseFormat An attribute that specifies the default outgoing response format. This attribute is of the WebMessageFormat type
helpEnabled A Boolean value that indicates whether the HTTP help page is enabled for the endpoint.
webEndpointType A string that specifies the type of the endpoint.

Child Elements

None.

Parent Elements

Element Description
<standardEndpoints> A collection of standard endpoints that are pre-defined endpoints with one or more of their properties (address, binding, contract) fixed.

See also