X509CertificateInitiatorClientCredential.Certificate Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the certificate to use to represent the service when communicating back to the client.

Namespace:   System.ServiceModel.Security
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public X509Certificate2 Certificate { get; set; }

Property Value

Type: System.Security.Cryptography.X509Certificates.X509Certificate2

The X509Certificate2 to use to represent the service when communicating back to the client.

Exception Condition
InvalidOperationException

A set method was used when the credential is read-only.

When the first call is made on the Windows Communication Foundation (WCF) proxy, the ClientCredentials are made read-only. Subsequently calling the set method results in an InvalidOperationException.

.NET Framework
Available since 3.0
Return to top
Show: