MessageSecurityOverHttp.ClientCredentialType Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Specifies the type of client credential used for client authentication in the wsHttpBinding or wsDualHttpBinding bindings.

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

public MessageCredentialType ClientCredentialType { get; set; }

Exception Condition
ArgumentOutOfRangeException

The value of ClientCredentialType is not a valid MessageCredentialType.

This property is used to set the MessageCredentialType that is used to authenticate the caller at the service. Valid types are:

The following code sets this property.

WSHttpBinding myBinding = new WSHttpBinding();
myBinding.Security.Mode = SecurityMode.Message;
myBinding.Security.Message.ClientCredentialType =
    MessageCredentialType.Windows;

.NET Framework
Available since 3.0
Return to top
Show: