X509ServiceCertificateAuthentication.TrustedStoreLocation Propiedad

Definición

Obtiene o establece la ubicación del almacén de confianza en la que se valida el contexto en el que se valida la cadena de certificados de cliente.

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 de propiedad

Ubicación del almacén de confianza.

Excepciones

Se intentó establecer cuando la credencial es de solo lectura.

Ejemplos

En el código siguiente se muestra cómo establecer esta propiedad.

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 propiedad también se puede establecer en un archivo de configuración.

Comentarios

Esta propiedad especifica si se usará el contexto de equipo o usuario para comprobar la cadena de certificados X.509.

Se aplica a