Binding.Protocol 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 protocol the binding will use.
public:
property System::String ^ Protocol { System::String ^ get(); void set(System::String ^ value); };
public string Protocol { get; set; }
member this.Protocol : string with get, set
Public Property Protocol As String
Property Value
The protocol identifier for the binding.
Examples
The following example demonstrates the Protocol 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.
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
A value of "http" indicates a binding that uses the HTTP protocol. A value of "https" indicates a binding that uses HTTP over SSL.
The Protocol property value is maintained in the ApplicationHost.config file.