MessageCredentialType Enumeration
.NET Framework 3.0
Enumerates the valid message credential types.
Namespace: System.ServiceModel
Assembly: System.ServiceModel (in system.servicemodel.dll)
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.
Dim myServiceHost As New ServiceHost(GetType(CalculatorService)) ' Create a binding to use. Dim binding As 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.Community Additions
ADD
Show: