我正在 VM(Windows 7 64 位)中运行 Visual Studio 2012,但在访问 Nuget 时遇到问题。我在虚拟机上使用的用户名不是我用于通过代理进行身份验证的用户名,因此我的 devenv.exe.config 文件如下所示:
<system.net>
<defaultProxy useDefaultCredentials="false" enabled="true">
<proxy usesystemdefault="True"/>
</defaultProxy>
<settings>
<servicePointManager expect100Continue="false"/>
<ipv6 enabled="true"/>
</settings>
</system.net>
最初当我打开扩展和更新时,我收到以下消息:
A connection to the server could not be established because the following error(s) occurred: There was no endpoint listening at http://visualstudiogallery.msdn.microsoft.com/Services/v2011/Extension.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. Unable to connect to the remote server A connection attemp dailed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 65.52.103.91:80
阅读几篇文章后,我转到“工具”->“选项”->“环境”->“Web 浏览器”,然后单击“Internet Explorer 选项...”按钮。然后我进入连接 -> LAN 设置,虽然我们使用配置脚本,但我添加了代理服务器并单击“确定”。
现在,在线扩展和更新时消息已更改:
A connection to the server could not be established because the following errors(s) occured: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The Authentication header recieved from the server was 'NTLM, Basic realm="Our Proxy Server". The remote server returned an error:(401) Unauthorised.
那么我如何才能让我使用正确的凭据来传递代理?
最佳答案
您是否尝试使用 Windows 凭据管理器?
您应该能够注册如下所示的 Windows 凭据:
Internet or Network Address : *.mycompany.com
User Name : Your User Name
Password : Your Password
您也可以将网络地址限制为仅代理服务器。
关于configuration - Vs2012无法使用代理连接到Nuget,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16311374/