MessageCredentialType Enumeration
Enumerates the valid message credential types.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
| Member name | Description | |
|---|---|---|
| Certificate | Specifies client authentication using a certificate. | |
| IssuedToken | Specifies client authentication using an issued token. | |
| None | Specifies anonymous authentication. | |
| UserName | Specifies client authentication using UserName. | |
| Windows | Specifies 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");
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms