<add> for <scopedCertificates> Element

Adds an X.509 certificate to the collection of scoped certificates.

<system.serviceModel>

  <behaviors>

    <endpointBehaviors>

      <behavior> of <endpointBehaviors>

        <clientCredentials>

          <serviceCertificate> of <serviceCredentials>

            <add> for <scopedCertificates> Element

                                    
                                    <add targetUri="https://www.contoso.com" 
                                
                                    
                                    findValue="String" x509Type="FindByThumbprint/FindBySubjectName/FindBySubjectDistinguishedName/FindByIssuerName/FindByIssuerDistinguishedName/FindBySerialNumber/FindByTimeValid/FindByTimeNotYetValid/FindBySerialNumber/FindByTimeExpired/FindByTemplateName/FindByApplicationPolicy/FindByCertificatePolicy/FindByExtension/FindByKeyUsage/FindBySubjectKeyIdentifier" 
                                
                                    
                                    storeLocation="CurrentUser/LocalMachine"
                                
                                    
                                    storeName=" CurrentUser/LocalMachine"
                                
                                    
                                    /> 
                                

Attributes and Elements

The following sections describe attributes, child elements, and parent elements

Attributes

Attribute Description

targetUri

String. Specifies the URI of the service associated with the certificate.

findValue

String. The value to search for.

x509FindType

Enumeration. One of the certificate fields to search.

storeLocation

Enumeration. One of the two store locations to search.

storeName

Enumeration. One of the system stores to search.

findValue Attribute


Value Description

String

The value depends on the field (specified by the X509FindType attribute) being searched. For example, if searching for a thumbprint, the value must be a string of hexadecimal numbers.

x509FindType Attribute

Value Description

Enumeration

Values include: FindByThumbprint, FindBySubjectName, FindBySubjectDistinguishedName, FindByIssuerName, FindByIssuerDistinguishedName, FindBySerialNumber, FindByTimeValid, FindByTimeNotYetValid, FindBySerialNumber, FindByTimeExpired, FindByTemplateName, FindByApplicationPolicy, FindByCertificatePolicy, FindByExtension, FindByKeyUsage, FindBySubjectKeyIdentifier.

storeLocation Attribute


Value Description

Enumeration

CurrentUser or LocalMachine.

storeName Attribute

Value Description

Enumeration

Values include: AddressBook, AuthRoot, CertificateAuthority, Disallowed, My, Root, TrustedPeople, and TrustedPublisher.

Child Elements

None.

Parent Elements


Element Description

<scopedCertificates> Element

Represents a collection of X.509 certificates provided by specific services (scoped) for authentication.

Example

The following example adds an X.509 certificate the collection.

<behaviors>
 <endpointBehaviors>
  <behavior name="MyEndpointBehavior">
   <clientCredentials>
    <serviceCertificate>
     <scopedCertificates>
      <add targetUri="https://www.contoso.com" 
       findValue="www.Contoso.com" 
       storeLocation="LocalMachine"
       storeName="Root" 
       x509FindType="FindByIssuerName" />
     </scopedCertificates>
    </serviceCertificate>
   </clientCredentials>
  </behavior>
 </endpointBehaviors>
</behaviors>

See Also

Reference

ScopedCertificates

Other Resources

Working with Certificates

Footer image

Send comments about this topic to Microsoft.
© Microsoft Corporation. All rights reserved.