ConfigurationSetting 方法 - SetSecureConnectionLevel

设置报表服务器的安全连接级别。

语法

Public Sub SetSecureConnectionLevel(Level as Integer, _  
    ByRef HRESULT as Int32)  
public void SetSecureConnectionLevel(Int32 Level,   
    out Int32 HRESULT);  

参数

Level
表示安全连接级别的整数值。

HRESULT
[out] 指示调用是成功还是失败的值。

返回值

返回 HRESULT ,指示方法调用是成功还是失败。 值 0 指示方法调用已成功。 非零值指示发生了错误。

注解

调用时,报表服务器 SecureConnectionLevel 属性设置为指定的值。 值为 0 表示禁用了 TLS。 值大于或等于 1 表示启用了 TLS。

  • 设置该值时,将更改报表服务器配置文件中的 SecureConnectionLevel 元素,并将配置文件中的 URLRoot 元素设置为使用 https://(如果指定的“级别”大于或等于 1)或使用 http://(如果指定的“级别”为 0)。

在 SQL Server 2008 R2 (10.50.x) 中,SecureConnectionLevel 成为一个开关,默认值为 0。 对于任何通过 SetSecureConnectionLevel 方法 API 传递的大于或等于 1 的值,TLS 被视为启用,且配置属性 SecureConnectionLevelrsreportserver.config 文件中进行相应的设置。 将仍允许值为 2 和 3,以便向后兼容。

要求

命名空间:root\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Admin

MSReportServer_ConfigurationSetting 成员