Binding.CertificateStoreName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the name of the certificate store.
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
Property Value
The name of the certificate store.
Examples
The following example demonstrates the CertificateStoreName property. If the protocol is "https", the certificate hash and certificate store name are displayed. This code example is part of a larger example provided for the Binding class.
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;
}
Remarks
The CertificateStoreName property value contains the name of the certificate store where the certificate for the binding is located.
The CertificateStoreName property is available only when the protocol identifier defined by the Protocol property is "https". An attempt to get or set the CertificateStoreName property for a binding with a protocol of "http" will raise an error.
The value of the CertificateStoreName property is set in the BindingCollection object.