다음을 통해 공유


Binding.CertificateStoreName 속성

정의

인증서 저장소의 이름을 가져오거나 설정합니다.

public:
 property System::String ^ CertificateStoreName { System::String ^ get(); void set(System::String ^ value); };
public string CertificateStoreName { get; set; }
member this.CertificateStoreName : string with get, set
Public Property CertificateStoreName As String

속성 값

인증서 저장소의 이름입니다.

예제

다음 예제는 CertificateStoreName 속성입니다. 프로토콜이 "https"인 경우 인증서 해시 및 인증서 저장소 이름이 표시됩니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 Binding 클래스입니다.

if (binding.Protocol == "https")
{
     // There is a CertificateHash and  
     // CertificateStoreName for the https protocol only.
    bindingdisplay = bindingdisplay + "\n   CertificateHash: " + 
        binding.CertificateHash + ": ";
    // Display the hash.
    foreach (System.Byte certhashbyte in binding.CertificateHash)
    {
        bindingdisplay = bindingdisplay + certhashbyte.ToString() + " ";
    }
    bindingdisplay = bindingdisplay + "\n   CertificateStoreName: " + 
        binding.CertificateStoreName;
}

설명

속성 값에는 CertificateStoreName 바인딩에 대한 인증서가 있는 인증서 저장소의 이름이 포함됩니다.

속성은 CertificateStoreName 속성에 정의된 Protocol 프로토콜 식별자가 "https"인 경우에만 사용할 수 있습니다. "http"의 프로토콜을 사용하여 바인딩에 CertificateStoreName 대한 속성을 얻거나 설정하려고 하면 오류가 발생합니다.

속성의 CertificateStoreName 값은 개체에 설정됩니다 BindingCollection .

적용 대상