X509ServiceCertificateAuthentication.TrustedStoreLocation Proprietà

Definizione

Ottiene o imposta il percorso dell'archivio attendibile in base al quale viene convalidata la catena di 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

Tentativo di impostazione quando le credenziali sono di sola lettura.

Esempio

Nel codice seguente viene illustrato 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

La proprietà può essere impostata anche in un file di configurazione.

Commenti

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

Si applica a