Export (0) Print
Expand All
Expand Minimize

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 =
    MessageCredentialType.Certificate;

// Set the client certificate.
myServiceHost.Credentials.ClientCertificate.SetCertificate(
    StoreLocation.CurrentUser,
    StoreName.My,
    X509FindType.FindBySubjectName,
    "client.com");

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

ADD
Show:
© 2014 Microsoft