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.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft