Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1369 lines (1197 sloc) 71.2 KB
<Type Name="BasicHttpBinding" FullName="System.ServiceModel.BasicHttpBinding">
<TypeSignature Language="C#" Value="public class BasicHttpBinding : System.ServiceModel.HttpBindingBase" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit BasicHttpBinding extends System.ServiceModel.HttpBindingBase implements class System.ServiceModel.Channels.IBindingRuntimePreferences" />
<TypeSignature Language="DocId" Value="T:System.ServiceModel.BasicHttpBinding" />
<TypeSignature Language="VB.NET" Value="Public Class BasicHttpBinding&#xA;Inherits HttpBindingBase" />
<TypeSignature Language="C++ CLI" Value="public ref class BasicHttpBinding : System::ServiceModel::HttpBindingBase" />
<TypeSignature Language="F#" Value="type BasicHttpBinding = class&#xA; inherit HttpBindingBase&#xA; interface IBindingRuntimePreferences" />
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ServiceModel.HttpBindingBase</BaseTypeName>
<BaseTypeName FrameworkAlternate="netframework-3.0">System.ServiceModel.Channels.Binding</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ServiceModel.Channels.IBindingRuntimePreferences</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Represents a binding that a Windows Communication Foundation (WCF) service can use to configure and expose endpoints that are able to communicate with ASMX-based Web services and clients and other services that conform to the WS-I Basic Profile 1.1.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.ServiceModel.BasicHttpBinding> uses HTTP as the transport for sending SOAP 1.1 messages. A service can use this binding to expose endpoints that conform to WS-I BP 1.1, such as those that ASMX clients access. Similarly, a client can use the <xref:System.ServiceModel.BasicHttpBinding> to communicate with services exposing endpoints that conform to WS-I BP 1.1, such as ASMX Web services or Windows Communication Foundation (WCF) services configured with the <xref:System.ServiceModel.BasicHttpBinding>.
Security is turned off by default, but can be added setting the <xref:System.ServiceModel.BasicHttpSecurityMode> to a value other than <xref:System.ServiceModel.BasicHttpSecurityMode.None> in the <xref:System.ServiceModel.BasicHttpBinding.%23ctor%28System.ServiceModel.BasicHttpSecurityMode%29> constructor. It uses a "Text" message encoding and UTF-8 text encoding by default.
## Examples
The following example shows how to configure the <xref:System.ServiceModel.BasicHttpBinding> in an application configuration file.
The following example shows how to programmatically configure <xref:System.ServiceModel.BasicHttpBinding>.
[!code-csharp[S_UEBasicHttpBinding#1](~/samples/snippets/csharp/VS_Snippets_CFX/s_uebasichttpbinding/cs/service.cs#1)]
[!code-vb[S_UEBasicHttpBinding#1](~/samples/snippets/visualbasic/VS_Snippets_CFX/s_uebasichttpbinding/vb/service.vb#1)]
]]></format>
</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.ServiceModel.BasicHttpBinding" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public BasicHttpBinding ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.BasicHttpBinding.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; BasicHttpBinding();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.ServiceModel.BasicHttpBinding" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default value of <xref:System.ServiceModel.BasicHttpSecurityMode> used is <xref:System.ServiceModel.BasicHttpSecurityMode.None>, which specifies that the SOAP message is not secured and the client is not authenticated.
## Examples
[!code-csharp[S_UEBasicHttpBinding#2](~/samples/snippets/csharp/VS_Snippets_CFX/s_uebasichttpbinding/cs/service.cs#2)]
[!code-vb[S_UEBasicHttpBinding#2](~/samples/snippets/visualbasic/VS_Snippets_CFX/s_uebasichttpbinding/vb/service.vb#2)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public BasicHttpBinding (System.ServiceModel.BasicHttpSecurityMode securityMode);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.ServiceModel.BasicHttpSecurityMode securityMode) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.BasicHttpBinding.#ctor(System.ServiceModel.BasicHttpSecurityMode)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (securityMode As BasicHttpSecurityMode)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; BasicHttpBinding(System::ServiceModel::BasicHttpSecurityMode securityMode);" />
<MemberSignature Language="F#" Value="new System.ServiceModel.BasicHttpBinding : System.ServiceModel.BasicHttpSecurityMode -&gt; System.ServiceModel.BasicHttpBinding" Usage="new System.ServiceModel.BasicHttpBinding securityMode" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="securityMode" Type="System.ServiceModel.BasicHttpSecurityMode" />
</Parameters>
<Docs>
<param name="securityMode">The value of <see cref="T:System.ServiceModel.BasicHttpSecurityMode" /> that specifies the type of security that is used with the SOAP message and for the client.</param>
<summary>Initializes a new instance of the <see cref="T:System.ServiceModel.BasicHttpBinding" /> class with a specified type of security used by the binding.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default value of <xref:System.ServiceModel.BasicHttpSecurityMode> used is <xref:System.ServiceModel.BasicHttpSecurityMode.None>, which specifies that the SOAP message is not secured and the client is not authenticated.
## Examples
[!code-csharp[S_UEBasicHttpBinding#3](~/samples/snippets/csharp/VS_Snippets_CFX/s_uebasichttpbinding/cs/snippets.cs#3)]
[!code-vb[S_UEBasicHttpBinding#3](~/samples/snippets/visualbasic/VS_Snippets_CFX/s_uebasichttpbinding/vb/snippets.vb#3)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public BasicHttpBinding (string configurationName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string configurationName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.BasicHttpBinding.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (configurationName As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; BasicHttpBinding(System::String ^ configurationName);" />
<MemberSignature Language="F#" Value="new System.ServiceModel.BasicHttpBinding : string -&gt; System.ServiceModel.BasicHttpBinding" Usage="new System.ServiceModel.BasicHttpBinding configurationName" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Parameters>
<Parameter Name="configurationName" Type="System.String" Index="0" FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="configurationName">The binding configuration name for the <see cref="T:System.ServiceModel.Configuration.BasicHttpBindingElement" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.ServiceModel.BasicHttpBinding" /> class with a binding specified by its configuration name.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
This example initializes a new <xref:System.ServiceModel.BasicHttpBinding> class with a binding specified by the configuration name `myBinding`. You must create a bindings section in the service's configuration file.
[!code-csharp[S_UEBasicHttpBinding#5](~/samples/snippets/csharp/VS_Snippets_CFX/s_uebasichttpbinding/cs/snippets.cs#5)]
[!code-vb[S_UEBasicHttpBinding#5](~/samples/snippets/visualbasic/VS_Snippets_CFX/s_uebasichttpbinding/vb/snippets.vb#5)]
Then the name of the binding configuration is specified in the call to the <xref:System.ServiceModel.BasicHttpBinding> constructor.
[!code-csharp[S_UEBasicHttpBinding#4](~/samples/snippets/csharp/VS_Snippets_CFX/s_uebasichttpbinding/cs/snippets.cs#4)]
[!code-vb[S_UEBasicHttpBinding#4](~/samples/snippets/visualbasic/VS_Snippets_CFX/s_uebasichttpbinding/vb/snippets.vb#4)]
]]></format>
</remarks>
<exception cref="T:System.Configuration.ConfigurationErrorsException">The binding with the configuration name <paramref name="configurationName" /> was not found.</exception>
</Docs>
</Member>
<Member MemberName="AllowCookies">
<MemberSignature Language="C#" Value="public bool AllowCookies { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowCookies" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.AllowCookies" />
<MemberSignature Language="VB.NET" Value="Public Property AllowCookies As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool AllowCookies { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.AllowCookies : bool with get, set" Usage="System.ServiceModel.BasicHttpBinding.AllowCookies" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether the client accepts cookies and propagates them on future requests.</summary>
<value>
<see langword="true" /> if cookies are allowed; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property is provided as a convenience for interacting with ASMX Web services that use cookies.
When cookies are accepted by the client by setting the property to `true`, cookies returned from the server are automatically copied to all future client requests to that service.
## Examples
The following example sets this property to indicate that all cookies from the server should be copied to future client requests:
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
binding.AllowCookies = true;
```
The value of this property can also be set in the configuration file.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BuildChannelFactory&lt;TChannel&gt;">
<MemberSignature Language="C#" Value="public override System.ServiceModel.Channels.IChannelFactory&lt;TChannel&gt; BuildChannelFactory&lt;TChannel&gt; (System.ServiceModel.Channels.BindingParameterCollection parameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.ServiceModel.Channels.IChannelFactory`1&lt;!!TChannel&gt; BuildChannelFactory&lt;TChannel&gt;(class System.ServiceModel.Channels.BindingParameterCollection parameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.BasicHttpBinding.BuildChannelFactory``1(System.ServiceModel.Channels.BindingParameterCollection)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function BuildChannelFactory(Of TChannel) (parameters As BindingParameterCollection) As IChannelFactory(Of TChannel)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA;generic &lt;typename TChannel&gt;&#xA; override System::ServiceModel::Channels::IChannelFactory&lt;TChannel&gt; ^ BuildChannelFactory(System::ServiceModel::Channels::BindingParameterCollection ^ parameters);" />
<MemberSignature Language="F#" Value="override this.BuildChannelFactory : System.ServiceModel.Channels.BindingParameterCollection -&gt; System.ServiceModel.Channels.IChannelFactory&lt;'Channel&gt;" Usage="basicHttpBinding.BuildChannelFactory parameters" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.IChannelFactory&lt;TChannel&gt;</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TChannel" />
</TypeParameters>
<Parameters>
<Parameter Name="parameters" Type="System.ServiceModel.Channels.BindingParameterCollection" Index="0" FrameworkAlternate="dotnet-plat-ext-2.1;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0;dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<typeparam name="TChannel">The type of channel the channel factory produces.</typeparam>
<param name="parameters">Specifies the requirements for the channel factory built.</param>
<summary>Builds the channel factory stack on the client that creates a specified type of channel and that satisfies the features specified by a collection of binding parameters.</summary>
<returns>An <see cref="T:System.ServiceModel.Channels.IChannelFactory`1" /> of type <paramref name="TChannel" /> that satisfies the features specified by the collection.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="BypassProxyOnLocal">
<MemberSignature Language="C#" Value="public bool BypassProxyOnLocal { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool BypassProxyOnLocal" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.BypassProxyOnLocal" />
<MemberSignature Language="VB.NET" Value="Public Property BypassProxyOnLocal As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool BypassProxyOnLocal { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.BypassProxyOnLocal : bool with get, set" Usage="System.ServiceModel.BasicHttpBinding.BypassProxyOnLocal" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether to bypass the proxy server for local addresses.</summary>
<value>
<see langword="true" /> to bypass the proxy server for local addresses; otherwise, <see langword="false" />. The default value is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
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 the BypassProxyOnLocal property determines whether endpoints configured with the <xref:System.ServiceModel.BasicHttpBinding> use the proxy server when accessing local resources.
If BypassProxyOnLocal 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 property is set to `true`.
When BypassProxyOnLocal is `false`, all Internet requests to non-localhost URIs are made through the proxy server. Requests to URIs with localhost will not use the proxy server regardless of the BypassProxyOnLocal setting.
## Examples
The following example sets this property to indicate that the proxy should be bypassed for local resources.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
binding.BypassProxyOnLocal = true;
```
The value of this property can also be set in the configuration file.
```xml
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1"
bypassProxyOnLocal="true">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CreateBindingElements">
<MemberSignature Language="C#" Value="public override System.ServiceModel.Channels.BindingElementCollection CreateBindingElements ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.ServiceModel.Channels.BindingElementCollection CreateBindingElements() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.BasicHttpBinding.CreateBindingElements" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function CreateBindingElements () As BindingElementCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::ServiceModel::Channels::BindingElementCollection ^ CreateBindingElements();" />
<MemberSignature Language="F#" Value="override this.CreateBindingElements : unit -&gt; System.ServiceModel.Channels.BindingElementCollection" Usage="basicHttpBinding.CreateBindingElements " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.Channels.BindingElementCollection</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates and returns an ordered collection of binding elements contained in the current binding.</summary>
<returns>The <see cref="T:System.ServiceModel.Channels.BindingElementCollection" /> that contains the ordered stack of binding elements described by the <see cref="T:System.ServiceModel.BasicHttpBinding" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The order of the binding elements is important. It reflects the order in which the protocol and transport channels are constructed and stacked. This collection of binding elements is a new collection and can be modified and then used to create a <xref:System.ServiceModel.Channels.CustomBinding>.
## Examples
The following example creates an ordered collection of the binding elements in the current binding.
[!code-csharp[S_UEBasicHttpBinding#26](~/samples/snippets/csharp/VS_Snippets_CFX/s_uebasichttpbinding/cs/client.cs#26)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="EnableHttpCookieContainer">
<MemberSignature Language="C#" Value="public bool EnableHttpCookieContainer { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool EnableHttpCookieContainer" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.EnableHttpCookieContainer" />
<MemberSignature Language="VB.NET" Value="Public Property EnableHttpCookieContainer As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool EnableHttpCookieContainer { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.EnableHttpCookieContainer : bool with get, set" Usage="System.ServiceModel.BasicHttpBinding.EnableHttpCookieContainer" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.Obsolete("This property is obsolete. To enable Http CookieContainer, use the AllowCookies property instead.", false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether HTTP cookie container is enabled.</summary>
<value>
<see langword="true" /> if HTTP cookie container is enabled; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="EnvelopeVersion">
<MemberSignature Language="C#" Value="public System.ServiceModel.EnvelopeVersion EnvelopeVersion { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.EnvelopeVersion EnvelopeVersion" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.EnvelopeVersion" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property EnvelopeVersion As EnvelopeVersion" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::EnvelopeVersion ^ EnvelopeVersion { System::ServiceModel::EnvelopeVersion ^ get(); };" />
<MemberSignature Language="F#" Value="member this.EnvelopeVersion : System.ServiceModel.EnvelopeVersion" Usage="System.ServiceModel.BasicHttpBinding.EnvelopeVersion" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ServiceModel.EnvelopeVersion</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the version of SOAP that is used for messages that are processed by this binding.</summary>
<value>The value of the <see cref="T:System.ServiceModel.EnvelopeVersion" /> that is used with this binding. The value is always SOAP 1.1.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
SOAP 1.1 is the only value that can be used with this binding.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HostNameComparisonMode">
<MemberSignature Language="C#" Value="public System.ServiceModel.HostNameComparisonMode HostNameComparisonMode { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.ServiceModel.HostNameComparisonMode HostNameComparisonMode" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.HostNameComparisonMode" />
<MemberSignature Language="VB.NET" Value="Public Property HostNameComparisonMode As HostNameComparisonMode" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::HostNameComparisonMode HostNameComparisonMode { System::ServiceModel::HostNameComparisonMode get(); void set(System::ServiceModel::HostNameComparisonMode value); };" />
<MemberSignature Language="F#" Value="member this.HostNameComparisonMode : System.ServiceModel.HostNameComparisonMode with get, set" Usage="System.ServiceModel.BasicHttpBinding.HostNameComparisonMode" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.HostNameComparisonMode</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether the hostname is used to reach the service when matching the URI.</summary>
<value>The <see cref="T:System.ServiceModel.HostNameComparisonMode" /> value that indicates whether the hostname is used to reach the service when matching on the URI. The default value is <see cref="F:System.ServiceModel.HostNameComparisonMode.StrongWildcard" />, which ignores the hostname in the match.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example sets this property to indicate that an exact match is required.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
binding.HostNameComparisonMode = HostNameComparisonMode.Exact;
```
The value of this property can also be set in the configuration file.
```xml
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1"
hostNameComparisonMode ="Exact">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MaxBufferPoolSize">
<MemberSignature Language="C#" Value="public long MaxBufferPoolSize { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int64 MaxBufferPoolSize" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.MaxBufferPoolSize" />
<MemberSignature Language="VB.NET" Value="Public Property MaxBufferPoolSize As Long" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property long MaxBufferPoolSize { long get(); void set(long value); };" />
<MemberSignature Language="F#" Value="member this.MaxBufferPoolSize : int64 with get, set" Usage="System.ServiceModel.BasicHttpBinding.MaxBufferPoolSize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.DefaultValue(524288)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int64</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the maximum amount of memory, in bytes, that is allocated for use by the manager of the message buffers that receive messages from the channel.</summary>
<value>The maximum amount of memory, in bytes, available for use by the message buffer manager. The default value is 524288 (0x80000) bytes.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.ServiceModel.Channels.BufferManager> 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 <xref:System.ServiceModel.Channels.BufferManager> 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 MaxBufferPoolSize limit.
## Examples
The following example sets this property to twice the default value.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
// Use double the default value
binding.MaxBufferPoolSize = 0x80000 * 2;
```
The value of this property can also be set in the configuration file.
```xml
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1">
<!-- set pool size to double default of 0x80000 -->
maxBufferPoolSize = 0x100000
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MaxBufferSize">
<MemberSignature Language="C#" Value="public int MaxBufferSize { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 MaxBufferSize" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.MaxBufferSize" />
<MemberSignature Language="VB.NET" Value="Public Property MaxBufferSize As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int MaxBufferSize { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.MaxBufferSize : int with get, set" Usage="System.ServiceModel.BasicHttpBinding.MaxBufferSize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.DefaultValue(65536)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the maximum size, in bytes, for a buffer that receives messages from the channel.</summary>
<value>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.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If there is not sufficient memory in the buffer to store the message while it is processed, more memory must be allocated from the CLR heap, which increases the garbage collection overhead.
Extensive allocation from the CLR garbage heap is an indication that the message buffer size is too small and that performance can be improved with a larger allocation.
The value of the MaxBufferSize property and its significance is different depending on whether the messages are being buffered or streamed on the channel through which they are being received:
- For buffered transports (<xref:System.ServiceModel.BasicHttpBinding.TransferMode> set to <xref:System.ServiceModel.TransferMode.Buffered?displayProperty=nameWithType>), this value is always equal to that specified by the <xref:System.ServiceModel.BasicHttpBinding.MaxReceivedMessageSize> property.
- For streamed transports (<xref:System.ServiceModel.BasicHttpBinding.TransferMode> set to <xref:System.ServiceModel.TransferMode.Streamed?displayProperty=nameWithType>), only the SOAP headers must be buffered to generate the message.
The body can be streamed in on-demand. In this case, MaxBufferSize is less than or equal to <xref:System.ServiceModel.BasicHttpBinding.MaxReceivedMessageSize>, where <xref:System.ServiceModel.BasicHttpBinding.MaxReceivedMessageSize> bounds the size of the overall message (headers and body) and MaxBufferSize bounds only the size of the SOAP headers.
The limitations on buffer size set here are for optimizing the performance of message exchanges.
If a message exceeds the maximum value set for the buffer, it is not dropped.
Instead, more memory is requested from the CLR heap and this incurs more garbage collection overhead than using the buffers.
> [!NOTE]
> The settings for MaxBufferSize and MaxReceivedMessageSize, are local behavioral settings.
> This means that they are not transmitted to other endpoints in metadata.
> If you generate a proxy to a service with a maximum message size of 2GB from metadata, the proxy still has a default value of 64K.
> This leaves control of the appropriate bounds for message and message buffer size in the scope of local administrators.
## Examples
The following example sets **MaxBufferSize** to 1,000,000 bytes.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
// set to one million
binding.MaxBufferSize = 1000000;
```
The value of this property can also be set in the configuration file.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MaxReceivedMessageSize">
<MemberSignature Language="C#" Value="public long MaxReceivedMessageSize { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int64 MaxReceivedMessageSize" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.MaxReceivedMessageSize" />
<MemberSignature Language="VB.NET" Value="Public Property MaxReceivedMessageSize As Long" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property long MaxReceivedMessageSize { long get(); void set(long value); };" />
<MemberSignature Language="F#" Value="member this.MaxReceivedMessageSize : int64 with get, set" Usage="System.ServiceModel.BasicHttpBinding.MaxReceivedMessageSize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.DefaultValue(65536)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int64</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the maximum size, in bytes, for a message that can be received on a channel configured with this binding.</summary>
<value>The maximum size, in bytes, for a message that is processed by the binding. The default value is 65,536 bytes.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The size of the messages that can be received on the wire by services using the BasicHttpBinding is bounded by the amount of memory allocated for each message.
This bound on message size is intended to limit exposure to DoS-style attacks.
There is also a <xref:System.ServiceModel.BasicHttpBinding.MaxBufferSize> property on the <xref:System.ServiceModel.BasicHttpBinding>:
For buffered transports, (<xref:System.ServiceModel.BasicHttpBinding.TransferMode> set to <xref:System.ServiceModel.TransferMode.Buffered>).
This value is always equal to that specified by the MaxReceivedMessageSize.
For streamed transports (<xref:System.ServiceModel.BasicHttpBinding.TransferMode> set to <xref:System.ServiceModel.TransferMode.Streamed>), only the SOAP headers must be buffered to generate the message.
The body can be streamed in on-demand. In this case, <xref:System.ServiceModel.BasicHttpBinding.MaxBufferSize> is less than or equal to MaxReceivedMessageSize,
where MaxReceivedMessageSize bounds the size of the overall message (headers and body) and <xref:System.ServiceModel.BasicHttpBinding.MaxBufferSize> bounds the size of the SOAP headers.
## Examples
The following example sets MaxReceivedMessageSize to 1,000,000 bytes.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
// Use double the default value
binding.MaxReceivedMessageSize = 65536 * 2;
```
The value of this property can also be set in the configuration file.
```xml
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1"
maxReceivedMessageSize = "1000000">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
```
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The value is less than zero.</exception>
</Docs>
</Member>
<Member MemberName="MessageEncoding">
<MemberSignature Language="C#" Value="public System.ServiceModel.WSMessageEncoding MessageEncoding { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.ServiceModel.WSMessageEncoding MessageEncoding" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.MessageEncoding" />
<MemberSignature Language="VB.NET" Value="Public Property MessageEncoding As WSMessageEncoding" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::WSMessageEncoding MessageEncoding { System::ServiceModel::WSMessageEncoding get(); void set(System::ServiceModel::WSMessageEncoding value); };" />
<MemberSignature Language="F#" Value="member this.MessageEncoding : System.ServiceModel.WSMessageEncoding with get, set" Usage="System.ServiceModel.BasicHttpBinding.MessageEncoding" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.WSMessageEncoding</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets whether MTOM or Text is used to encode SOAP messages.</summary>
<value>The value of <see cref="T:System.ServiceModel.WSMessageEncoding" /> that indicates whether MTOM or Text/XML is used to encode SOAP messages. The default value is <see cref="F:System.ServiceModel.WSMessageEncoding.Text" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example sets MessageEncoding to Text.
[!code-csharp[S_UEBasicHttpBinding#19](~/samples/snippets/csharp/VS_Snippets_CFX/s_uebasichttpbinding/cs/client.cs#19)]
The value of this property can also be set in the configuration file.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ProxyAddress">
<MemberSignature Language="C#" Value="public Uri ProxyAddress { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri ProxyAddress" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.ProxyAddress" />
<MemberSignature Language="VB.NET" Value="Public Property ProxyAddress As Uri" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property Uri ^ ProxyAddress { Uri ^ get(); void set(Uri ^ value); };" />
<MemberSignature Language="F#" Value="member this.ProxyAddress : Uri with get, set" Usage="System.ServiceModel.BasicHttpBinding.ProxyAddress" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.UriTypeConverter))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the URI address of the HTTP proxy.</summary>
<value>A <see cref="T:System.Uri" /> that serves as the address of the HTTP proxy. The default value is null.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.ServiceModel.BasicHttpBinding.UseDefaultWebProxy> is set to `true`, the default address is used and the value of the ProxyAddress set is ignored.
## Examples
The following example sets ProxyAddress to application settings.
```csharp
// Get base address from app settings in configuration
Uri baseAddress = new Uri(ConfigurationManager.AppSettings["baseAddress"]);
BasicHttpBinding binding = new BasicHttpBinding();
binding.ProxyAddress = baseAddress;
```
The value of this property can also be set in the configuration file.
```xml
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1"
proxyAddress = "http://myProxy">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ReaderQuotas">
<MemberSignature Language="C#" Value="public System.Xml.XmlDictionaryReaderQuotas ReaderQuotas { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Xml.XmlDictionaryReaderQuotas ReaderQuotas" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.ReaderQuotas" />
<MemberSignature Language="VB.NET" Value="Public Property ReaderQuotas As XmlDictionaryReaderQuotas" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Xml::XmlDictionaryReaderQuotas ^ ReaderQuotas { System::Xml::XmlDictionaryReaderQuotas ^ get(); void set(System::Xml::XmlDictionaryReaderQuotas ^ value); };" />
<MemberSignature Language="F#" Value="member this.ReaderQuotas : System.Xml.XmlDictionaryReaderQuotas with get, set" Usage="System.ServiceModel.BasicHttpBinding.ReaderQuotas" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Xml.XmlDictionaryReaderQuotas</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding.</summary>
<value>The <see cref="T:System.Xml.XmlDictionaryReaderQuotas" /> that specifies the complexity constraints.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The complexity constraints provide protection from denial of service (DOS) attacks that attempt to use message complexity to tie up endpoint processing resources.
Other complexity constraints include items such as a maximum element depth and a maximum length for string content within the message.
## Examples
The following example sets ReaderQuotas to application settings.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
XmlDictionaryReaderQuotas readerQuotas = new XmlDictionaryReaderQuotas();
readerQuotas.MaxArrayLength = 25 * 1024;
binding.ReaderQuotas = readerQuotas;
```
The value of this property can also be set in the configuration file.
```xml
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1">
<readerQuotas maxBytesPerRead ="1000"
maxDepth="100"/>
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Scheme">
<MemberSignature Language="C#" Value="public override string Scheme { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Scheme" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.Scheme" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property Scheme As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ Scheme { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Scheme : string" Usage="System.ServiceModel.BasicHttpBinding.Scheme" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the URI transport scheme for the channels and listeners that are configured with this binding.</summary>
<value>"https" if the security mode in the transport binding element is set to <see cref="F:System.ServiceModel.BasicHttpSecurityMode.Transport" /> or <see cref="F:System.ServiceModel.BasicHttpSecurityMode.TransportWithMessageCredential" />; "http" otherwise.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example gets the current Scheme.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
string thisScheme = binding.Scheme;
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Security">
<MemberSignature Language="C#" Value="public System.ServiceModel.BasicHttpSecurity Security { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ServiceModel.BasicHttpSecurity Security" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.Security" />
<MemberSignature Language="VB.NET" Value="Public Property Security As BasicHttpSecurity" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::BasicHttpSecurity ^ Security { System::ServiceModel::BasicHttpSecurity ^ get(); void set(System::ServiceModel::BasicHttpSecurity ^ value); };" />
<MemberSignature Language="F#" Value="member this.Security : System.ServiceModel.BasicHttpSecurity with get, set" Usage="System.ServiceModel.BasicHttpBinding.Security" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.5.0.1</AssemblyVersion>
<AssemblyVersion>4.5.0.3</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.BasicHttpSecurity</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the type of security used with this binding.</summary>
<value>The <see cref="T:System.ServiceModel.BasicHttpSecurity" /> that is used with this binding. The default value is <see cref="F:System.ServiceModel.BasicHttpSecurityMode.None" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, the SOAP message is not secured and the client is not authenticated. To use a non-default type of security, use the <xref:System.ServiceModel.BasicHttpBinding.%23ctor%28System.ServiceModel.BasicHttpSecurityMode%29> constructor.
## Examples
The following example gets the `Security` property.
[!code-csharp[S_UEBasicHttpBinding#23](~/samples/snippets/csharp/VS_Snippets_CFX/s_uebasichttpbinding/cs/client.cs#23)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ShouldSerializeEnableHttpCookieContainer">
<MemberSignature Language="C#" Value="public bool ShouldSerializeEnableHttpCookieContainer ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool ShouldSerializeEnableHttpCookieContainer() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.BasicHttpBinding.ShouldSerializeEnableHttpCookieContainer" />
<MemberSignature Language="VB.NET" Value="Public Function ShouldSerializeEnableHttpCookieContainer () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool ShouldSerializeEnableHttpCookieContainer();" />
<MemberSignature Language="F#" Value="member this.ShouldSerializeEnableHttpCookieContainer : unit -&gt; bool" Usage="basicHttpBinding.ShouldSerializeEnableHttpCookieContainer " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Indicates whether the http cookie container should enable the serialization.</summary>
<returns>
<see langword="true" /> if the http cookie container should enable the serialization; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ShouldSerializeReaderQuotas">
<MemberSignature Language="C#" Value="public bool ShouldSerializeReaderQuotas ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool ShouldSerializeReaderQuotas() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.BasicHttpBinding.ShouldSerializeReaderQuotas" />
<MemberSignature Language="VB.NET" Value="Public Function ShouldSerializeReaderQuotas () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool ShouldSerializeReaderQuotas();" />
<MemberSignature Language="F#" Value="member this.ShouldSerializeReaderQuotas : unit -&gt; bool" Usage="basicHttpBinding.ShouldSerializeReaderQuotas " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns whether the constraint values placed on the complexity of SOAP message structure should be serialized.</summary>
<returns>
<see langword="true" /> if reader quotas should be serialized; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ShouldSerializeSecurity">
<MemberSignature Language="C#" Value="public bool ShouldSerializeSecurity ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool ShouldSerializeSecurity() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.BasicHttpBinding.ShouldSerializeSecurity" />
<MemberSignature Language="VB.NET" Value="Public Function ShouldSerializeSecurity () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool ShouldSerializeSecurity();" />
<MemberSignature Language="F#" Value="member this.ShouldSerializeSecurity : unit -&gt; bool" Usage="basicHttpBinding.ShouldSerializeSecurity " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns whether security settings should be serialized based upon whether serialization already occurs, for example at the message or transport level.</summary>
<returns>
<see langword="true" /> if security should be serialized; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ShouldSerializeTextEncoding">
<MemberSignature Language="C#" Value="public bool ShouldSerializeTextEncoding ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool ShouldSerializeTextEncoding() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ServiceModel.BasicHttpBinding.ShouldSerializeTextEncoding" />
<MemberSignature Language="VB.NET" Value="Public Function ShouldSerializeTextEncoding () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool ShouldSerializeTextEncoding();" />
<MemberSignature Language="F#" Value="member this.ShouldSerializeTextEncoding : unit -&gt; bool" Usage="basicHttpBinding.ShouldSerializeTextEncoding " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns whether settings for text encoding should be serialized.</summary>
<returns>
<see langword="true" /> if text encoding should be serialized; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.ServiceModel.Channels.IBindingRuntimePreferences.ReceiveSynchronously">
<MemberSignature Language="C#" Value="bool System.ServiceModel.Channels.IBindingRuntimePreferences.ReceiveSynchronously { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.ServiceModel.Channels.IBindingRuntimePreferences.ReceiveSynchronously" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.System#ServiceModel#Channels#IBindingRuntimePreferences#ReceiveSynchronously" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property ReceiveSynchronously As Boolean Implements IBindingRuntimePreferences.ReceiveSynchronously" />
<MemberSignature Language="C++ CLI" Value="property bool System::ServiceModel::Channels::IBindingRuntimePreferences::ReceiveSynchronously { bool get(); };" />
<MemberSignature Language="F#" Usage="System.ServiceModel.Channels.IBindingRuntimePreferences.ReceiveSynchronously" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.ServiceModel.Channels.IBindingRuntimePreferences.ReceiveSynchronously</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether incoming requests are handled synchronously or asynchronously.</summary>
<value>Always <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
This example gets the ReceiveSynchronously value.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
IBindingRuntimePreferences s = (binding as IBindingRuntimePreferences);
bool receiveSynchronously = s.ReceiveSynchronously;
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TextEncoding">
<MemberSignature Language="C#" Value="public System.Text.Encoding TextEncoding { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Text.Encoding TextEncoding" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.TextEncoding" />
<MemberSignature Language="VB.NET" Value="Public Property TextEncoding As Encoding" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Text::Encoding ^ TextEncoding { System::Text::Encoding ^ get(); void set(System::Text::Encoding ^ value); };" />
<MemberSignature Language="F#" Value="member this.TextEncoding : System.Text.Encoding with get, set" Usage="System.ServiceModel.BasicHttpBinding.TextEncoding" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.ServiceModel.Configuration.EncodingConverter))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Text.Encoding</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the character encoding that is used for the message text.</summary>
<value>The <see cref="T:System.Text.Encoding" /> that indicates the character encoding that is used. The default is <see cref="T:System.Text.UTF8Encoding" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example sets TextEncoding to <xref:System.Text.Encoding.Unicode?displayProperty=nameWithType>.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
binding.TextEncoding = System.Text.Encoding.Unicode;
```
The value of this property can also be set in the configuration file.
```xml
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1"
textEncoding = "UnicodeFffeTextEncoding">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TransferMode">
<MemberSignature Language="C#" Value="public System.ServiceModel.TransferMode TransferMode { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.ServiceModel.TransferMode TransferMode" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.TransferMode" />
<MemberSignature Language="VB.NET" Value="Public Property TransferMode As TransferMode" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ServiceModel::TransferMode TransferMode { System::ServiceModel::TransferMode get(); void set(System::ServiceModel::TransferMode value); };" />
<MemberSignature Language="F#" Value="member this.TransferMode : System.ServiceModel.TransferMode with get, set" Usage="System.ServiceModel.BasicHttpBinding.TransferMode" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ServiceModel.TransferMode</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether messages are sent buffered or streamed.</summary>
<value>The <see cref="T:System.ServiceModel.TransferMode" /> that indicates whether messages are sent buffered or streamed.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example sets TransferMode to <xref:System.ServiceModel.TransferMode.Streamed>.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
binding.TransferMode = TransferMode.Streamed;
```
The value of this property can also be set in the configuration file.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="UseDefaultWebProxy">
<MemberSignature Language="C#" Value="public bool UseDefaultWebProxy { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool UseDefaultWebProxy" />
<MemberSignature Language="DocId" Value="P:System.ServiceModel.BasicHttpBinding.UseDefaultWebProxy" />
<MemberSignature Language="VB.NET" Value="Public Property UseDefaultWebProxy As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool UseDefaultWebProxy { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.UseDefaultWebProxy : bool with get, set" Usage="System.ServiceModel.BasicHttpBinding.UseDefaultWebProxy" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Http</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether the auto-configured HTTP proxy of the system should be used, if available.</summary>
<value>
<see langword="true" /> if the auto-configured HTTP proxy of the system should be used, if available; otherwise, <see langword="false" />. The default value is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
It is an error for this to be `true` and <xref:System.ServiceModel.BasicHttpBinding.ProxyAddress> to be non-null.
## Examples
This example sets the value of UseDefaultWebProxy to `false`.
```csharp
BasicHttpBinding binding = new BasicHttpBinding();
binding.UseDefaultWebProxy = false;
```
The value of this property can also be set in the configuration file.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.