다음을 통해 공유


X509ServiceCertificateAuthentication.TrustedStoreLocation 속성

정의

클라이언트 인증서 체인의 유효성을 검사하는 신뢰할 수 있는 저장소 위치를 가져오거나 설정합니다.

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

속성 값

StoreLocation

신뢰할 수 있는 저장소 위치입니다.

예외

읽기 전용인 자격 증명을 설정하려고 한 경우

예제

다음 코드에서는 이 속성을 설정하는 방법을 보여 줍니다.

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

구성 파일에서도 속성을 설정할 수 있습니다.

설명

이 속성은 컴퓨터 또는 사용자 컨텍스트를 사용하여 X.509 인증서 체인을 확인할지 여부를 지정합니다.

적용 대상