Aracılığıyla paylaş


ServiceCredentials.SecureConversationAuthentication Özellik

Tanım

Güvenli bir konuşma tarafından kullanılacak geçerli ayarları alır.

public:
 property System::ServiceModel::Security::SecureConversationServiceCredential ^ SecureConversationAuthentication { System::ServiceModel::Security::SecureConversationServiceCredential ^ get(); };
public System.ServiceModel.Security.SecureConversationServiceCredential SecureConversationAuthentication { get; }
member this.SecureConversationAuthentication : System.ServiceModel.Security.SecureConversationServiceCredential
Public ReadOnly Property SecureConversationAuthentication As SecureConversationServiceCredential

Özellik Değeri

Bir SecureConversationServiceCredential örnek.

Örnekler

Aşağıdaki kod, hizmet tarafından kullanılan kimlik bilgilerinin örneğini almak için bu özelliğin nasıl kullanılacağını gösterir.

// 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;
' Create a service host.
Dim httpUri As New Uri("http://localhost/Calculator")
Dim sh As New ServiceHost(GetType(Calculator), httpUri)

' Create a binding that uses a WindowsServiceCredential .
Dim b As New WSHttpBinding(SecurityMode.Message)
b.Security.Message.ClientCredentialType = MessageCredentialType.Windows

' Add an endpoint.
sh.AddServiceEndpoint(GetType(ICalculator), b, "WindowsCalculator")

' Get a reference to the WindowsServiceCredential object.
Dim ssCredential As SecureConversationServiceCredential = sh.Credentials.SecureConversationAuthentication

Açıklamalar

Güvenlik Bağlam Belirteci (SCT) tanımlama bilgileri serileştirmesi için bilinen talep türlerinin listesini ve tanımlama bilgilerini kodlamak ve güvenliğini sağlamak için bir kodlayıcı belirtmek için bu sınıfı kullanın.

Şunlara uygulanır