HttpWebClientProtocol.ClientCertificates Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene l’insieme di certificati client.
public:
property System::Security::Cryptography::X509Certificates::X509CertificateCollection ^ ClientCertificates { System::Security::Cryptography::X509Certificates::X509CertificateCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get; }
[<System.ComponentModel.Browsable(false)>]
member this.ClientCertificates : System.Security.Cryptography.X509Certificates.X509CertificateCollection
Public ReadOnly Property ClientCertificates As X509CertificateCollection
Valore della proprietà
Oggetto X509CertificateCollection che rappresenta i certificati client.
- Attributi
Esempio
Nell'esempio di codice seguente viene illustrato come caricare un certificato client da un file e quindi aggiungerlo alla ClientCertificates proprietà per chiamare un metodo di servizio Web XML che usa i certificati client per l'autenticazione.
// Create a new instance of a proxy class for the Bank XML Web service.
BankSession bank = new BankSession();
// Load the client certificate from a file.
X509Certificate x509 = X509Certificate.CreateFromCertFile(@"c:\user.cer");
// Add the client certificate to the ClientCertificates property of the proxy class.
bank.ClientCertificates.Add(x509);
// Communicate with the Deposit XML Web service method,
// which requires authentication using client certificates.
bank.Deposit(500);
' Create a new instance of a proxy class for the Bank XML Web service.
Dim bank As BankSession = new BankSession()
' Load the client certificate from a file.
Dim x509 As X509Certificate = X509Certificate.CreateFromCertFile("c:\user.cer")
' Add the client certificate to the ClientCertificates property of the proxy class.
bank.ClientCertificates.Add(x509)
' Communicate with the Deposit XML Web service method,
' which requires authentication using client certificates.
bank.Deposit(500)
Commenti
Questa proprietà consente a un client di passare uno o più certificati client, noti anche come certificati Authenticode X.509 v.3, quando si chiama un metodo di servizio Web XML. Se il metodo del servizio Web XML è stato configurato per l'utilizzo dei certificati client, è possibile usare un certificato client come un meccanismo per l'autenticazione di un client. Per informazioni dettagliate sulla configurazione dei certificati client, vedere la documentazione di Internet Information Services (IIS).
Si applica a
Vedi anche
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per