Compartir a través de


<httpTransport> (Silverlight)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

This element configures the maximum buffer size and the maximum received message size for the HTTP transport.

Syntax

   <binding> 
       <httpTransport           transferMode="string"
           maxBufferSize="Integer"
           maxReceivedMessageSize="long" />           <extendedProtectionPolicy>       </httpTransport>
    </binding>

Attributes and Elements

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

Attributes

Attribute Description

transferMode

An optional value that indicates whether a channel uses streamed or buffered modes for the transfer of request and response messages.

  1. Buffered transfers hold the entire message in a memory buffer until the transfer is complete. This transfer mode enables buffered communication in both directions.

  2. Streamed transfers only buffer the message headers and expose the message body as a stream, from which smaller portions can be read at a time. This transfer mode enables streaming communication only in the response.

maxBufferSize

An optional integer value that specifies the maximum size, in bytes, of a buffer that stores messages while they are processed for an endpoint configured with this binding. The default value is 2147483647 bytes.

maxReceivedMessageSize

An optional positive integer that defines the maximum message size, in bytes, including headers, for a message that can be received on a channel configured with this binding. The sender receives a SOAP fault if the message is too large for the receiver. The default is 2147483647 bytes.

Child Elements

Element Description

<extendedProtectionPolicy> of <httpTransport> (Silverlight)

This element is supported for interoperability only and is not used in the Silverlight 4 programming model.

Parent Elements

Element Description

<binding> of <customBinding> (Silverlight)

Used to configure Silverlight client communications with services that expose endpoints that do not conform to WS-I BP 1.1 or when you want full control over the message stack.

Text Value

Remarks

Example

The following example demonstrates how to configure the maximum buffer size of a custom binding.

<configuration>
  <system.serviceModel>
    <bindings>
      <!-- configure a custom binding -->
      <customBinding>
        <binding name="CustomBinding1">
          <httpTransport maxBufferSize="2147483647" />
        </binding>
      </customBinding>
    </bindings>
  </system.serviceModel>
</configuration>

See Also

Reference

<httpsTransport> (Silverlight)