Share via


SqlConnectionStringBuilder.ServerCertificate 屬性

定義

取得或設定憑證檔案的路徑,以符合連線的 SQL Server TLS/SSL 憑證。 接受的憑證格式為 PEM、DER 和 CER。 如果指定,則會藉由確認 ServerCertificate 提供的 是否完全相符,來檢查SQL Server憑證。 (僅適用于 v5.1+)

public:
 property System::String ^ ServerCertificate { System::String ^ get(); void set(System::String ^ value); };
public string ServerCertificate { get; set; }
member this.ServerCertificate : string with get, set
Public Property ServerCertificate As String

屬性值

ServerCertificate 屬性的值,如未提供任何值,則為 String.Empty

備註

此屬性會對應至連接字串內的 「ServerCertificate」 和 「Server Certificate」 金鑰。

注意

只有在 或 Strict 模式中使用 EncryptMandatory 時,才會套用這個屬性,否則會忽略此屬性。

適用於