IncludeWindowsGroups Property

X509ClientCertificateAuthentication.IncludeWindowsGroups Property

Gets or sets a value that indicates whether Windows groups are included in the authorization context.

Namespace: System.ServiceModel.Security
Assembly: System.ServiceModel (in system.servicemodel.dll)

public bool IncludeWindowsGroups { get; set; }
/** @property */
public boolean get_IncludeWindowsGroups ()

/** @property */
public void set_IncludeWindowsGroups (boolean value)

public function get IncludeWindowsGroups () : boolean

public function set IncludeWindowsGroups (value : boolean)

Not applicable.

Property Value

true if Windows groups are included in the authorization context; otherwise, false. The default is true.

This property is valid only when the MapClientCertificateToWindowsAccount property is set to true.

Set this property to false only if you do not need to establish the list of groups a user belongs to - this may result in a performance benefit if your application and authorization decisions do not require Windows groups.

The following code illustrates setting this property.

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

The property can also be set in a configuration file.

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2016 Microsoft