X509CertificateInitiatorClientCredential.Certificate 属性

定义

获取或设置在向客户端反馈时用于表示服务的证书。Gets or sets the certificate to use to represent the service when communicating back to the client.

public:
 property System::Security::Cryptography::X509Certificates::X509Certificate2 ^ Certificate { System::Security::Cryptography::X509Certificates::X509Certificate2 ^ get(); void set(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ value); };
public System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate { get; set; }
member this.Certificate : System.Security.Cryptography.X509Certificates.X509Certificate2 with get, set
Public Property Certificate As X509Certificate2

属性值

X509Certificate2

向用户端反馈时用于表示服务的 X509Certificate2The X509Certificate2 to use to represent the service when communicating back to the client.

例外

在凭据为只读时使用 set 方法。A set method was used when the credential is read-only.

注解

在 Windows Communication Foundation (WCF) 代理上进行第一次调用时,将 ClientCredentials 变为只读。When the first call is made on the Windows Communication Foundation (WCF) proxy, the ClientCredentials are made read-only. 随后,调用 set 方法会导致 InvalidOperationExceptionSubsequently calling the set method results in an InvalidOperationException.

适用于