設定 Proxy 設定的逐步指南

如果您的工作環境需要 Microsoft 內部部署數據閘道通過 Proxy 伺服器來連線到服務,請遵循下列步驟來設定 Proxy 設定。

設定 Proxy 設定

  1. 建立 Proxy 定義元素。 若要深入瞭解 .NET 組態檔的 Proxy 元素組態,請移至 defaultProxy 元素(網路設定)。

    下列範例會透過埠 8888 上 IP 位址為 192.168.0.1 的特定 Proxy 路由傳送所有要求:

    <defaultProxy useDefaultCredentials="true">
        <proxy  
            autoDetect="false"  
            proxyaddress="http://192.168.0.1:8888"
            bypassonlocal="false"
            usesystemdefault="false"
        />
    </defaultProxy>
    
  2. 瀏覽內部部署數據閘道的安裝資料夾,例如 *C:\Program Files\On-premises 數據閘道*。

  3. 開啟用於設定閘道之組態畫面的第一個檔案,也就是 EnterpriseGatewayConfigurator.exe.config

  4. 找出 元素, defaultProxy 並將它取代為在上述步驟 1 中建立的 Proxy 組態,然後將變更儲存至檔案。

  5. 開啟第二個檔案,該檔案用於使用閘道與雲端服務互動的實際 Windows 服務,並處理要求,也就是 Microsoft.PowerBI.EnterpriseGateway.exe.config 並重複步驟 4。

  6. 針對用於網關聯機至數據源的第三個組態檔,通常是雲端數據源,請在安裝資料夾中開啟子資料夾 m ,然後將檔案 Microsoft.Mashup.Container.NetFX45.exe.config。重複步驟 4,將 Proxy 組態插入此檔案中。

    如果檔案處於默認狀態,您必須將標記與 Proxy 定義一起新增 system.net ,如下列範例所示:

    <system.net>
        <defaultProxy useDefaultCredentials="true">
            <proxy  
                autoDetect="false"  
                proxyaddress="http://192.168.0.1:8888"
                bypassonlocal="false"
                usesystemdefault="false"
            />
        </defaultProxy>
    </system.net>
    
  7. 開啟內部部署數據閘道應用程式,流覽至 [服務 設定] 索引標籤,然後選取 [立即重新啟動] 以重新啟動閘道服務並套用新的 Proxy 設定。

確認一致的 Proxy 組態

  1. 請確定您正在執行 2022 年 9 月版本或更新版本。

  2. 開啟內部部署數據閘道應用程式。

  3. 流覽至 [ 診斷] 索引標籤

  4. 在 [網络埠測試] 底下,選取 [啟動新測試]。

  5. 網路埠測試完成後,請選取 [ 開啟上次完成的測試結果]。

  6. 如果您的 Proxy 組態在三個 Proxy configuration : Proxy settings match for all Gateway process configurations. 必要組態檔中一致,則會顯示一則訊息。

  7. 否則,如果 Proxy 設定不一致,則會顯示下列資訊:

    Proxy configuration : Proxy settings are not consistent. Please ensure that the proxy configuration matches across the files listed below:
    C:\Program Files\On-premises data gateway\EnterpriseGatewayConfigurator.exe.config
    C:\Program Files\On-premises data gateway\Microsoft.PowerBI.EnterpriseGateway.exe.config
    C:\Program Files\On-premises data gateway\m\Microsoft.Mashup.Container.NetFX45.exe.config
    Review <https://docs.microsoft.com/data-integration/gateway/service-gateway-proxy>  for additional information about configuring proxies for the Gateway.
    

從內部部署數據閘道執行 Proxy 設定一致性驗證時,將會驗證下列組態檔:

%LocalAppData%\Microsoft\內部部署數據網關 (個人模式)\PersonalGatewayConfigurator.exe.config %LocalAppData%\Microsoft\On-premises 數據網關 (個人模式)\Microsoft.PowerBI.DataMovement.PersonalGateway.exe.config %LocalAppData%\Microsoft\On-premises 數據網關 (個人模式)\m\Microsoft.Mashup.Container.NetFX45.exe.config

不一致或遺漏 Proxy 設定行為

如果 Proxy 定義遺失或不一致,您可以使用內部部署數據閘道體驗不同的行為。 一些範例包括:

  • 語意模型或數據流重新整理失敗,錯誤訊息範例: Error: Unable to connect to the remote server
  • 在啟動內部部署數據閘道時,您無法登入,登入提示會出現,但無法顯示其內容,或顯示錯誤訊息頁面。
  • 網路埠測試結果會報告連線到伺服器的失敗。

下一步