Share via


X509ServiceCertificateAuthentication.TrustedStoreLocation Proprietà

Definizione

Ottiene o imposta il percorso dell'archivio attendibile nel cui contesto viene convalidata la catena dei certificati client.

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

Valore della proprietà

Percorso dell'archivio attendibile.

Eccezioni

È stata tentata l'impostazione di una credenziale di sola lettura.

Esempio

Nel codice seguente viene mostrato come impostare questa proprietà.

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

È anche possibile impostare la proprietà in un file di configurazione.

Commenti

Questa proprietà specifica se viene utilizzato il contesto del computer o dell'utente per verificare la catena di certificati X.509.

Si applica a