다음을 통해 공유


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

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(보안 컨텍스트 토큰) 쿠키 serialization을 위한 알려진 클레임 형식 목록과 쿠키 정보를 인코딩 및 보안할 인코더를 지정하려면 이 클래스를 사용합니다.

적용 대상