Export (0) Print
Expand All

BasicHttpMessageSecurity Class

Configures message-level security settings for BasicHttpBinding.

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

public sealed class BasicHttpMessageSecurity

BasicHttpBinding binding = new BasicHttpBinding("myBinding");
binding.Name = "binding1";
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
binding.Security.Mode = BasicHttpSecurityMode.Message;

BasicHttpSecurity security = binding.Security;
BasicHttpMessageSecurity msgSecurity = security.Message;

SecurityAlgorithmSuite sas = msgSecurity.AlgorithmSuite;
BasicHttpMessageCredentialType credType = msgSecurity.ClientCredentialType;

Console.WriteLine("The algorithm suite used is {0}", sas.ToString());
Console.WriteLine("The client credential type used is {0}", credType.ToString());
<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>

System.Object
  System.ServiceModel.BasicHttpMessageSecurity

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft