Condividi tramite


Binding.CertificateStoreName Proprietà

Definizione

Ottiene o imposta il nome dell'archivio certificati.

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

Valore della proprietà

Nome dell'archivio certificati.

Esempio

Nell'esempio seguente viene illustrata la CertificateStoreName proprietà . Se il protocollo è "https", vengono visualizzati l'hash del certificato e il nome dell'archivio certificati. Questo esempio di codice fa parte di un esempio più ampio fornito per la Binding classe .

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;
}

Commenti

Il CertificateStoreName valore della proprietà contiene il nome dell'archivio certificati in cui si trova il certificato per l'associazione.

La CertificateStoreName proprietà è disponibile solo quando l'identificatore del Protocol protocollo definito dalla proprietà è "https". Un tentativo di ottenere o impostare la CertificateStoreName proprietà per un'associazione con un protocollo "http" genererà un errore.

Il valore della CertificateStoreName proprietà viene impostato nell'oggetto BindingCollection .

Si applica a