SqlConnectionStringBuilder.TrustServerCertificate 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示通道是否在绕过证书链来验证信任时加密通道。
public:
property bool TrustServerCertificate { bool get(); void set(bool value); };
public bool TrustServerCertificate { get; set; }
member this.TrustServerCertificate : bool with get, set
Public Property TrustServerCertificate As Boolean
属性值
Boolean。 已识别的值为 true、false、yes 和 no。
注解
当 TrustServerCertificate 设置为 true 时,传输层将使用 SSL 来加密通道并跳过证书链以验证信任。 如果TrustServerCertificate设置为true加密并启用加密,则即使设置为false该加密,也会使用Encrypt服务器上指定的加密级别。 否则连接将会失败。