为本地数据网关配置代理设置Configuring proxy settings for the on-premises data gateway

你的工作环境可能要求你通过代理访问 Internet。Your work environment may require that you go through a proxy to access the internet. 这会阻止本地数据网关连接到该服务。This could prevent the on-premises data gateway from connecting to the service.

你的网络是否使用代理?Does your network use a proxy?

superuser.com 上的以下文章讨论了尝试确定网络上有无代理的可行方法。The following post on superuser.com discusses how you can try to determine if you have a proxy on your network.

如何确定我正在使用的代理服务器?(SuperUser.com)How do I know what proxy server I'm using? (SuperUser.com)

配置文件位置和默认配置Configuration file location and default configuration

在 .NET 配置文件中配置代理信息。Proxy information is configured within a .NET configuration file. 位置和文件名将因所用网关而异。The location, and file names, will be different depending on the gateway you are using.

本地数据网关On-premises data gateway

本地数据网关涉及两个主要配置文件。There are two main configuration files that are involved with the on-premises data gateway.

配置Configuration

第一个用于实际配置网关的配置屏幕。The first is for the configuration screens that actually configure the gateway. 如果你在配置网关时遇到问题,可查看此文件。If you are having issues configuring the gateway, this is the file you will want to look at.

C:\Program Files\On-premises data gateway\enterprisegatewayconfigurator.exe.config

Windows 服务Windows Service

第二个用于与 Power BI 服务进行交互并处理请求的实际 Windows 服务。The second is for the actual windows service that interacts with the Power BI service, and handles the requests.

C:\Program Files\On-premises data gateway\Microsoft.PowerBI.EnterpriseGateway.exe.config

配置代理设置Configuring proxy settings

默认代理配置如下。The default proxy configuration is the following.

<system.net>
    <defaultProxy useDefaultCredentials="true" />
</system.net>

默认配置适用于 Windows 身份验证。The default configuration works with Windows authentication. 如果你的代理服务器使用另一种形式的身份验证,则你将需要更改设置。If your proxy uses another form of authentication, you will need to change the settings. 如果你不确定,则应与你的网络管理员联系。If you are not sure, you should contact your network administrator.

若要了解有关 .NET 配置文件代理元素配置的详细信息,请参阅 defaultProxy 元素(网络设置)To learn more about the configuration of the proxy elements for .NET configuration files, see defaultProxy Element (Network Settings).

将网关服务帐户更改为域用户Changing the gateway service account to a domain user

当配置代理设置以使用默认凭据时,如上文所述,你可能会遇到关于代理的身份验证问题。When configuring the proxy settings to use default credentials, as explained above, you may encounter authentication issues with your proxy. 这是因为默认服务帐户是服务 SID,而不是经过身份验证的域用户。This is because the default service account is the Service SID and not an authenticated domain user. 你可以更改网关的服务帐户,以允许对代理进行正确的身份验证。You can change the service account of the gateway to allow proper authentication with your proxy.

备注

建议使用托管的服务帐户以避免重置密码。It is recommended that you use a managed service account to avoid having to reset passwords. 了解如何通过 Active Directory 创建托管服务帐户Learn how to create a managed service account within Active Directory.

更改本地数据网关服务帐户Change the on-premises data gateway service account

  1. 更改本地数据网关服务的 Windows 服务帐户。Change the Windows service account for the on-premises data gateway service.

    此服务的默认帐户是 NT SERVICE\PBIEgwService。The default account for this service is NT SERVICE\PBIEgwService. 你会想要在 Active Directory 域内将其更改为域用户帐户。You will want to change this to a domain user account within your Active Directory domain. 或者,你会想要使用托管服务帐户以避免更改密码。Or, you will want to use a managed service account to avoid having to change the password.

    你会想要在 Windows 服务属性中的“登录”选项卡上更改帐户。You will want to change the account on the Log On tab within the properties of the Windows service.

  2. 重启本地数据网关服务。Restart the on-premises data gateway service.

    从管理员命令提示符中,发出以下命令。From an admin command prompt, issue the following commands.

     net stop PBIEgwService
    
     net start PBIEgwService
    
  3. 启动本地数据网关配置器。Start the on-premises data gateway configurator. 可选择 Windows“开始”按钮,然后搜索“本地数据网关”。You can select the windows start button and search for on-premises data gateway.
  4. 登录到 Power BI。Sign in to Power BI.
  5. 使用恢复密钥还原网关。Restore the gateway using your recovery key.

    这将使新的服务帐户能够解密存储的数据源凭据。This will allow the new service account to be able to decrypt stored credentials for data sources.

后续步骤Next steps

本地数据网关(个人模型) 防火墙信息On-premises data gateway (personal mode) Firewall information
更多问题?More questions? 尝试参与 Power BI 社区Try the Power BI Community