Constructor CertificateCredential
CertificateCredential(Uri, X509Certificate)
Initializes a new instance of the CertificateCredential class for the specified service with the specified client certificate.
Declaration
public CertificateCredential(Uri serviceUri, X509Certificate clientCertificate)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | serviceUri | The service that can be accessed with this credential. |
| X509Certificate | clientCertificate | The client certificate. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Standard 2.0 | 100.14 - 100.15 |
| .NET 6.0 | 100.14 - 100.15 |
| .NET 6.0 Windows | 100.14 - 100.15 |
| .NET Framework | 100.14 - 100.15 |
| Xamarin.Android | 100.14 - 100.15 |
| Xamarin.iOS | 100.14 - 100.15 |
| UWP | 100.14 |
CertificateCredential(String, X509Certificate)
Initializes a new instance of the CertificateCredential class for the specified service with the specified client certificate.
Declaration
public CertificateCredential(string serviceUrl, X509Certificate clientCertificate)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | serviceUrl | The service that can be accessed with this credential. |
| X509Certificate | clientCertificate | The client certificate. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
| ArgumentException |
|
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Standard 2.0 | 100.14 - 100.15 |
| .NET 6.0 | 100.14 - 100.15 |
| .NET 6.0 Windows | 100.14 - 100.15 |
| .NET Framework | 100.14 - 100.15 |
| Xamarin.Android | 100.14 - 100.15 |
| Xamarin.iOS | 100.14 - 100.15 |
| UWP | 100.14 |