Share via


X509ServiceCertificateAuthentication.TrustedStoreLocation Vlastnost

Definice

Získá nebo nastaví umístění důvěryhodného úložiště, ve kterém kontextu je ověřen řetěz certifikátů klienta.

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

Hodnota vlastnosti

Umístění důvěryhodného úložiště.

Výjimky

Došlo k pokusu o nastavení, když jsou přihlašovací údaje jen pro čtení.

Příklady

Následující kód ukazuje, jak tuto vlastnost nastavit.

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

Vlastnost lze také nastavit v konfiguračním souboru.

Poznámky

Tato vlastnost určuje, jestli se k ověření řetězu certifikátů X.509 použije kontext počítače nebo uživatele.

Platí pro