简体   繁体   English

使用 Power shell 登录到 Power BI 会引发错误“System.Net.WebException:无法解析远程名称:'localhost.fiddler'”

[英]Login to Power BI with Power shell throws error “System.Net.WebException: The remote name could not be resolved: 'localhost.fiddler'”

When I'm trying to login to Power BI with Microsoft Power Shell ISE :当我尝试使用 Microsoft Power Shell ISE登录Power BI时:

Login-PowerBI

from the Package: MicrosoftPowerBIMgmt , I'm getting the following error:从 Package: MicrosoftPowerBIMgmt ,我收到以下错误:

Failed to get ADAL token: Unhandled Exception: System.AggregateException: One or more errors occurred.无法获取 ADAL 令牌:未处理的异常:System.AggregateException:发生了一个或多个错误。 ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.HttpRequestException:发送请求时出错。 ---> System.Net.WebException: The r emote name could not be resolved: 'localhost.fiddler' at System.Net.HttpWebRequest.EndGetResponse... ---> System.Net.WebException:无法解析 r 表情名称:System.Net.HttpWebRequest.EndGetResponse 处的“localhost.fiddler”...

I had a similar problem with Visual Studio NuGet service .我与 Visual Studio NuGet service有类似的问题。

When PowerShell tries to log in to Power BI account (when executing command Login-PowerBI ), it executes AzureADWindowsAuthenticator.exe , which looks for the configuration under:当 PowerShell 尝试登录Power BI帐户时(执行命令Login-PowerBI时),它会执行AzureADWindowsAuthenticator.exe ,它会查找以下配置:
MicrosoftPowerBIMgmt.Profileversion of power bi profilelibnetstandardWindowsAuthenticator directory. MicrosoftPowerBIMgmt.Profileversion of power bi profilelibnetstandardWindowsAuthenticator目录。

The configuration file is called AzureADWindowsAuthenticator.exe.config .配置文件称为AzureADWindowsAuthenticator.exe.config

To solve the problem edit the configuration file as Administrator and add the following under <configuration> section:要解决此问题,请以管理员身份编辑配置文件,并在<configuration>部分添加以下内容:

<system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true">
        <proxy usesystemdefault="true" bypassonlocal="true" />
   </defaultProxy>
   <settings>
        <ipv6 enabled="true"/>
   </settings>
</system.net>

The final result should be like this:最终结果应该是这样的:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM