ServiceCredentials.SecureConversationAuthentication Property

Definition

Gets the current settings to be used by a secure conversation.

C#
public System.ServiceModel.Security.SecureConversationServiceCredential SecureConversationAuthentication { get; }

Property Value

A SecureConversationServiceCredential instance.

Examples

The following code shows how to use this property to get the instance of the credential used by the service.

C#
// Create a service host.
Uri httpUri = new Uri("http://localhost/Calculator");
ServiceHost sh = new ServiceHost(typeof(Calculator), httpUri);

// Create a binding that uses a WindowsServiceCredential .
WSHttpBinding b = new WSHttpBinding(SecurityMode.Message);
b.Security.Message.ClientCredentialType = MessageCredentialType.Windows;

// Add an endpoint.
sh.AddServiceEndpoint(typeof(ICalculator), b, "WindowsCalculator");

// Get a reference to the WindowsServiceCredential object.
SecureConversationServiceCredential ssCredential =
    sh.Credentials.SecureConversationAuthentication;

Remarks

Use this class to specify a list of known claim types for the Security Context Token (SCT) cookies serialization and an encoder to encode and secure cookies information.

Applies to

Proizvod Verzije
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1