X509ServiceCertificateAuthentication.TrustedStoreLocation Propriedade

Definição

Obtém ou define o local do repositório confiável em cujo contexto a cadeia de certificados do cliente é validada.Gets or sets the trusted store location under which context the client certificate chain is validated.

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

Valor da propriedade

StoreLocation

O local de repositório confiável.The trusted store location.

Exceções

Tentativa de definir quando a credencial é somente leitura.Attempted to set when credential is read-only.

Exemplos

O código a seguir mostra como definir essa propriedade.The following code shows how to set this property.

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

A propriedade também pode ser definida em um arquivo de configuração.The property can also be set in a configuration file.

Comentários

Esta propriedade especifica se o contexto do computador ou do usuário será usado para verificar a cadeia de certificados X. 509.This property specifies whether machine or user context will be used to verify the X.509 certificate chain.

Aplica-se a