MessageCredentialType Enumeration
Collapse the table of content
Expand the table of content

MessageCredentialType Enumeration

Enumerates the valid message credential types.

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

public enum MessageCredentialType
public enum MessageCredentialType
public enum MessageCredentialType

 Member nameDescription
CertificateSpecifies client authentication using a certificate. 
IssuedTokenSpecifies client authentication using an issued token. 
NoneSpecifies anonymous authentication. 
UserNameSpecifies client authentication using UserName. 
WindowsSpecifies client authentication using Windows. 

This enumeration is used to specify the credential type required by a binding for authentication. It is used by all standard bindings except the BasicHttpBinding, which uses BasicHttpMessageCredentialType.

The following code shows how to access and set ClientCredentialType to a member of this enumeration.

ServiceHost myServiceHost = new ServiceHost(typeof(CalculatorService));
// Create a binding to use.
WSHttpBinding binding = new WSHttpBinding();
binding.Security.Mode = SecurityMode.Message;
binding.Security.Message.ClientCredentialType =

// Set the client certificate.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

© 2016 Microsoft