X509ServiceCertificateAuthentication.TrustedStoreLocation Eigenschap

Definitie

Hiermee wordt de vertrouwde archieflocatie opgehaald of ingesteld waaronder de context van de clientcertificaatketen wordt gevalideerd.

public:
 property System::Security::Cryptography::X509Certificates::StoreLocation TrustedStoreLocation { System::Security::Cryptography::X509Certificates::StoreLocation get(); void set(System::Security::Cryptography::X509Certificates::StoreLocation value); };
public System.Security.Cryptography.X509Certificates.StoreLocation TrustedStoreLocation { get; set; }
member this.TrustedStoreLocation : System.Security.Cryptography.X509Certificates.StoreLocation with get, set
Public Property TrustedStoreLocation As StoreLocation

Waarde van eigenschap

De vertrouwde winkellocatie.

Uitzonderingen

Er is geprobeerd om in te stellen wanneer de referentie het kenmerk Alleen-lezen heeft.

Voorbeelden

De volgende code laat zien hoe u deze eigenschap instelt.

ClientCredentials creds = new ClientCredentials();

// Configure chain trust.
creds.ServiceCertificate.Authentication.CertificateValidationMode
    = X509CertificateValidationMode.ChainTrust;
creds.ServiceCertificate.Authentication.TrustedStoreLocation
    = StoreLocation.LocalMachine;
Dim creds As New ClientCredentials()

' Configure chain trust.
creds.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.ChainTrust
creds.ServiceCertificate.Authentication.TrustedStoreLocation = StoreLocation.LocalMachine

De eigenschap kan ook worden ingesteld in een configuratiebestand.

Opmerkingen

Deze eigenschap geeft aan of de machine- of gebruikerscontext wordt gebruikt om de X.509-certificaatketen te verifiëren.

Van toepassing op