Glossary Item Box
The CertificateListForm Object is a visual control which displays and allows selection of certificates available on the local machine. This form is particularly useful in making certificate selection easier when starting a secure server or when using a secure client and the server requests client authentication.
Standard usage of the CertificateListForm would be to create a new instance, passing in the parameters controlling which certificates are displayed to the user. Display the CertificateListForm to the user. When the user makes a selection, check CertificateListForm.SelectedCertificate to get an instance of the Certificate object representing the certificate the user selected
To use the CertificateListForm
[C#] // Create a new CertificateListForm, showing all locations and names. CertificateListForm certform = new CertificateListForm(true, true); // Display the CertificateListForm to the user. if(certform.ShowDialog() == DialogResult.OK) { // User has selected a certificate. Set the Certificate property server1.Certificate = certform.SelectedCertificate; } else { // User did not choose a certificate. MessageBox.Show("Error. You must choose a certificate"); } [Visual Basic] ' Create a new CertificateListForm, showing all locations and names. Dim certform As New CertificateListForm(true, true) ' Display the CertificateListForm to the user. If certform.ShowDialog() == DialogResult.OK Then ' User has selected a certificate. Set the Certificate property server1.Certificate = certform.SelectedCertificate Else ' User did not choose a certificate. MessageBox.Show("Error. You must choose a certificate") End If
Send comments on this topic.
Documentation version 1.1.2.0.
© 2008 Dart Communications. All rights reserved.