Share via


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 會變成 on/off 開關,預設值為 0。 對於透過 SetSecureConnectionLevel 方法 API 所傳遞任何大於或等於 1 的值,都會將 TLS 視為開啟狀態,並且在 rsreportserver.config 檔案中據此設定組態屬性 SecureConnectionLevel。 基於回溯相容性,仍然允許使用值 2 和 3。

需求

Namespace:root\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Admin

MSReportServer_ConfigurationSetting 成員