Specifying a binding that provides context for the BasicHttpBinding to be exchanged by enabling HTTP cookies as the exchange mechanism.
<basicHttpContextBinding> <binding allowCookies="Boolean" bypassProxyOnLocal="Boolean" closeTimeout="TimeSpan" envelopeVersion="None/Soap11/Soap12" hostNameComparisonMode="StrongWildCard/Exact/WeakWildcard" maxBufferPoolSize="Integer" maxBufferSize="Integer" maxReceivedMessageSize="Integer" messageEncoding="Text/Mtom" name="string" openTimeout="TimeSpan" proxyAddress="URI" receiveTimeout="TimeSpan" sendTimeout="TimeSpan" textEncoding="UnicodeFffeTextEncoding/Utf16TextEncoding/Utf8TextEncoding" transferMode="Buffered/Streamed/StreamedRequest/StreamedResponse" useDefaultWebProxy="Boolean" <security mode="None/Transport/Message/TransportWithMessageCredential/TransportCredentialOnly"> <transport clientCredentialType="None/Basic/Digest/Ntlm/Windows/Certificate" proxyCredentialType="None/Basic/Digest/Ntlm/Windows" realm="string" /> <message algorithmSuite="Aes128/Aes192/Aes256/Rsa15Aes128/ Rsa15Aes256/TripleDes" clientCredentialType="UserName/Certificate"/> </security> <readerQuotas maxArrayLength="Integer" maxBytesPerRead="Integer" maxDepth="Integer" maxNameTableCharCount="Integer" maxStringContentLength="Integer" /> </binding> </basicHttpContextBinding>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
A Boolean value that indicates whether the client accepts cookies and propagates them on future requests. The default is false.
A Boolean value that indicates whether to bypass the proxy server for local addresses. The default is false.
An Internet resource is local if it has a local address. A local address is one that is on same computer, the local LAN or intranet and is identified, syntactically, by the lack of a period (.) as in the URIs "http://webserver/" and "http://localhost/".
Setting this attribute determines whether endpoints configured with the BasicHttpBinding use the proxy server when accessing local resources. If this attribute is true, requests to local Internet resources do not use the proxy server. Use the host name (rather than localhost) if you want clients to go through a proxy when talking to services on the same machine when this attribute is set to true.
When this attribute is false, all Internet requests are made through the proxy server.
Specifies the version of SOAP that is used for messages that are processed by this binding. The only valid value is Soap11.
Specifies the HTTP hostname comparison mode used to parse URIs. This attribute is of type T:System.ServiceModel.HostnameComparisonMode, which indicates whether the hostname is used to reach the service when matching on the URI. The default value is F:System.ServiceModel.HostnameComparisonMode.StrongWildcard, which ignores the hostname in the match.
An integer value that specifies the maximum amount of memory that is allocated for use by the manager of the message buffers that receive messages from the channel. The default value is 524288 (0x80000) bytes.
The Buffer Manager minimizes the cost of using buffers by using a buffer pool. Buffers are required to process messages by the service when they come out of the channel. If there is not sufficient memory in the buffer pool to process the message load, the Buffer Manager must allocate additional memory from the CLR heap, which increases the garbage collection overhead. Extensive allocation from the CLR garbage heap is an indication that the buffer pool size is too small and that performance can be improved with a larger allocation by increasing the limit specified by this attribute.
An 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 65,536 bytes.
A 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 receiver drops the message and creates an entry of the event in the trace log. The default is 65,536 bytes.
Defines the encoder used to encode the SOAP message. Valid values include the following:
The default is Text. This attribute is of type WSMessageEncoding.
Specifies the message version used by clients and services configured with the binding. This attribute is of type MessageVersion.
A string that contains the configuration name of the binding. This value should be unique because it is used as an identification for the binding. Each binding has a name and namespace attribute that together uniquely identify it in the metadata of the service. In addition, this name is unique among bindings of the same type. Starting with .NET Framework 4, bindings and behaviors are not required to have a name. For more information about default configuration and nameless bindings and behaviors, see Simplified Configuration and Simplified Configuration for WCF Services.
Specifies the XML namespace of the binding. The default value is "http://tempuri.org/Bindings". Each binding has a name and namespace attribute that together uniquely identify it in the metadata of the service.
A URI that contains the address of the HTTP proxy. If useSystemWebProxy is set to true, this setting must be null. The default is null.
Sets the character set encoding to be used for emitting messages on the binding. Valid values include the following:
The default is UTF8. This attribute is of type Encoding.
A valid TransferMode value that specifies whether messages are buffered or streamed on a request or response.
A Boolean value that specifies whether the auto-configured HTTP proxy of the system should be used, if available. The default is true.
Defines the security settings for the binding. This element is of type BasicHttpSecurityElement.
Defines the constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding. This element is of type XmlDictionaryReaderQuotasElement.
This element holds a collection of standard and custom bindings.
This binding element provides a protection level and an exchange mechanism as part of the context for a BasicHttpBinding.