BasicHttpMessageSecurity Class
TOC
Collapse the table of content
Expand the table of content

BasicHttpMessageSecurity Class

 

Configures message-level security settings for BasicHttpBinding.

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

System.Object
  System.ServiceModel.BasicHttpMessageSecurity

public sealed class BasicHttpMessageSecurity

NameDescription
System_CAPS_pubmethodBasicHttpMessageSecurity()

Initializes a new instance of the BasicHttpMessageSecurity class.

NameDescription
System_CAPS_pubpropertyAlgorithmSuite

Specifies the algorithm suite to use with BasicHttpMessageSecurity.

System_CAPS_pubpropertyClientCredentialType

Specifies the type of credential with which the client authenticates.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodShouldSerializeAlgorithmSuite()

Returns whether the algorithm suite to be used for securing messages at the SOAP level should be serialized.

System_CAPS_pubmethodShouldSerializeClientCredentialType()

Returns whether the client credential type should be serialized.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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());

.NET Framework
Available since 3.0

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

Return to top
Show:
© 2016 Microsoft