Binding.CertificateHash Property

IIS 7.0

Gets or sets the hash of the certificate to bind.

Namespace:   Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

public byte[] CertificateHash { get; set; }

Property Value

Type: System.Byte[]

The byte array that represents the Secure Sockets Layer (SSL) binding hash.

The CertificateHash property contains the certificate hash for the SSL binding. The certificate hash is the unique identifier for the certificate.

The CertificateHash property is available only when the protocol identifier defined by the Protocol property is "https". An attempt to get or set the CertificateHash property for a binding with a protocol of "http" will raise an error.

The value of the CertificateHash property is set in the BindingCollection object.

The following example demonstrates the CertificateHash property. If the protocol identifier 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.

Return to top