Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

BasicHttpBinding Constructor (String)

Initializes a new instance of the BasicHttpBinding class with a binding specified by its configuration name.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

new : 
        configurationName:string -> BasicHttpBinding

Parameters

configurationName
Type: System.String

The binding configuration name for the BasicHttpBindingElement.

ExceptionCondition
ConfigurationErrorsException

The binding with the configuration name configurationName was not found.

This example initializes a new BasicHttpBinding class with a binding specified by the configuration name BasicBinding. You must create a bindings section in the service's configuration file.

No code example is currently available or this language may not be supported.
<bindings>
  <!-- 
        Following is the expanded configuration section for a BasicHttpBinding.
        Each property is configured with the default value.
        See the TransportSecurity, and MessageSecurity samples in the
        Basic directory to learn how to configure these features.
        -->
  <basicHttpBinding>
    <binding name="BasicBinding" 
             hostNameComparisonMode="StrongWildcard" 
             receiveTimeout="00:10:00"
             sendTimeout="00:10:00"
             openTimeout="00:10:00"
             closeTimeout="00:10:00"
             maxReceivedMessageSize="65536" 
             maxBufferSize="65536" 
             maxBufferPoolSize="524288" 
             transferMode="Buffered" 
             messageEncoding="Text" 
             textEncoding="utf-8"
             bypassProxyOnLocal="false"
             useDefaultWebProxy="true" >
      <security mode="None" />
    </binding>
  </basicHttpBinding>
</bindings>

Then the name of the binding configuration is specified in the call to the BasicHttpBinding constructor.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft