Export (0) Print
Expand All

SqlConnectionStringBuilder.TrustServerCertificate Property

Gets or sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.

Namespace: System.Data.SqlClient
Assembly: System.Data (in system.data.dll)

public bool TrustServerCertificate { get; set; }
/** @property */
public boolean get_TrustServerCertificate ()

/** @property */
public void set_TrustServerCertificate (boolean value)

public function get TrustServerCertificate () : boolean

public function set TrustServerCertificate (value : boolean)

Not applicable.

Property Value

A Boolean. Recognized values are true, false, yes, and no.

When TrustServerCertificate is set to true, the transport layer will use SSL to encrypt the channel and bypass walking the certificate chain to validate trust. If TrustServerCertificate is set to true and encryption is turned on, the encryption level specified on the server will be used even if Encrypt is set to false. The connection will fail otherwise.

For more information, see "Encryption Hierarchy" and "Using Encryption Without Validation" in SQL Server 2005 Books Online.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft