X509ClientCertificateAuthentication.IncludeWindowsGroups 속성

정의

Windows 그룹을 인증 컨텍스트에 포함할지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool IncludeWindowsGroups { bool get(); void set(bool value); };
public bool IncludeWindowsGroups { get; set; }
member this.IncludeWindowsGroups : bool with get, set
Public Property IncludeWindowsGroups As Boolean

속성 값

Boolean

Windows 그룹을 인증 컨텍스트에 포함시킬 경우 true이고, 그렇지 않으면 false입니다. 기본값은 true입니다.

예제

다음 코드에서는 이 속성을 설정하는 방법을 보여 줍니다.

// Create a service host.
Uri httpUri = new Uri("http://localhost/Calculator");
ServiceHost sh = new ServiceHost(typeof(Calculator), httpUri);
// Create a binding that uses a certificate.
WSHttpBinding b = new WSHttpBinding(SecurityMode.Message);
b.Security.Message.ClientCredentialType =
    MessageCredentialType.Certificate;

// Get a reference to the authentication object.
X509ClientCertificateAuthentication myAuthProperties =
    sh.Credentials.ClientCertificate.Authentication;
// Configure IncludeWindowsGroups.
myAuthProperties.IncludeWindowsGroups = true;
' 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 certificate.
Dim b As New WSHttpBinding(SecurityMode.Message)
b.Security.Message.ClientCredentialType = MessageCredentialType.Certificate


' Get a reference to the authentication object.
Dim myAuthProperties As X509ClientCertificateAuthentication = _
sh.Credentials.ClientCertificate.Authentication
' Configure IncludeWindowsGroups.
myAuthProperties.IncludeWindowsGroups = True

구성 파일에서도 속성을 설정할 수 있습니다.

<serviceCredentials>  
  <clientCertificate>  
     <authentication includeWindowsGroups ='true'/>  
  </clientCertificate>  
</serviceCredentials>  

설명

이 속성은 MapClientCertificateToWindowsAccount 속성이 true로 설정된 경우에만 유효합니다.

사용자가 속한 그룹 목록을 설정할 필요가 없을 경우에만 이 속성을 false로 설정하십시오. 이렇게 하면 애플리케이션 및 인증 결정에 Windows 그룹이 필요하지 않을 경우 성능상의 이점을 얻을 수 있습니다.

적용 대상