ServiceCredentials.SecureConversationAuthentication 속성

정의

보안 대화에서 사용할 현재 설정을 가져옵니다.

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

속성 값

인스턴스입니다 SecureConversationServiceCredential .

예제

다음 코드에서는 이 속성을 사용하여 서비스에서 사용하는 자격 증명의 인스턴스를 가져오는 방법을 보여 줍니다.

// 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

설명

이 클래스를 사용하여 SCT(보안 컨텍스트 토큰) 쿠키 직렬화에 대해 알려진 클레임 유형 목록을 지정하고 쿠키 정보를 인코딩하고 보호하는 인코더를 지정합니다.

적용 대상