如果您的工作環境需要Microsoft內部部署數據閘道,才能透過 Proxy 伺服器連線到服務,請使用下列步驟來設定 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>瀏覽內部部署數據閘道的安裝資料夾,例如 *C:\Program Files\On-premises 數據閘道*。
開啟用於設定閘道之組態畫面的第一個檔案,也就是 EnterpriseGatewayConfigurator.exe.config。
找出
defaultProxy元素並將它取代為在步驟 1 中建立的代理配置,然後將變更儲存至檔案中。開啟用於使用閘道與雲端服務互動的實際 Windows 服務的第二個檔案,也就是 Microsoft.PowerBI.EnterpriseGateway.exe.config 並重複步驟 4。
針對用於網關聯機至數據源的第三個組態檔,通常是雲端數據源,請在安裝資料夾中開啟子資料夾 m ,然後將檔案 Microsoft.Mashup.Container.NetFX45.exe.config。重複步驟 4,將 Proxy 組態插入此檔案中。
如果檔案處於預設狀態,您必須新增
system.net標記與 Proxy 定義,如下列範例所示:<system.net> <defaultProxy useDefaultCredentials="true"> <proxy autoDetect="false" proxyaddress="http://192.168.0.1:8888" bypassonlocal="false" usesystemdefault="false" /> </defaultProxy> </system.net>開啟內部部署數據閘道應用程式,流覽至 [ 服務設定 ] 索引標籤,然後選取 [ 立即重新啟動 ] 以重新啟動閘道服務並套用新的 Proxy 設定。
確認一致的 Proxy 組態
請確定您正在執行 2022 年 9 月版本或更新版本。
開啟內部部署數據閘道應用程式。
瀏覽至診斷索引標籤。
在 [網络埠測試] 底下,選取 [啟動新測試]。
網路埠測試完成後,請選取 [開啟上次完成的測試結果]。
如果您的 Proxy 組態在三個
Proxy configuration : Proxy settings match for all Gateway process configurations.必要組態檔中一致,則會顯示一則訊息。否則,如果 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\On-premises data gateway (personal mode)\PersonalGatewayConfigurator.exe.config %LocalAppData%\Microsoft\On-premises data gateway (personal mode)\Microsoft.PowerBI.DataMovement.PersonalGateway.exe.config %LocalAppData%\Microsoft\On-premises data gateway (personal mode)\m\Microsoft.Mashup.Container.NetFX45.exe.config
不一致或遺漏 Proxy 設定行為
如果 Proxy 定義遺失或不一致,您可以使用內部部署數據閘道體驗不同的行為。 以下是幾個範例:
- 語意模型或數據流重新整理失敗,錯誤訊息範例:
Error: Unable to connect to the remote server。 - 啟動內部部署數據閘道時,您無法登入,登入提示會出現,但無法顯示其內容,或顯示錯誤訊息頁面。
- 網路埠測試結果顯示無法連線到伺服器。