visual-studio 无法连接到任何在线资源

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2859148/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 12:00:25  来源:igfitidea点击:

Cannot connect to any online resource

visual-studio-2010visual-studio

提问by KentZhou

I have Visual studio 2010 Premium installed on Windows 7. When I try to connect to an online gallery or online template, I get an error message like this:

我在 Windows 7 上安装了 Visual Studio 2010 Premium。当我尝试连接到在线图库或在线模板时,我收到如下错误消息:

Cannot search for online exensions because an error occured while trying to contact the server

无法搜索在线扩展,因为尝试联系服务器时发生错误

It asks me to enable access to extensions on the vistual studio gallery. I did enable those in Extension Manager Tools/Options page. Internet connection was fine, too.

它要求我启用对视觉工作室画廊扩展的访问。我确实在扩展管理器工具/选项页面中启用了这些。互联网连接也很好。

My computer firewall was turned off. I have proxy to connect to internet but it's working fine when the browser connects to internet (even the internal browser in vs2010 is working fine). So where is the place in VS2010 to set up the proxy for connection to other online resources?

我的电脑防火墙关闭了。我有连接到互联网的代理,但是当浏览器连接到互联网时它工作正常(甚至 vs2010 中的内部浏览器工作正常)。那么在VS2010中设置连接其他在线资源的代理的地方在哪里呢?

I am running the VS2010 Ultimate trial on another computer and that works fine.

我正在另一台计算机上运行 VS2010 Ultimate 试用版,效果很好。

回答by Aaron Marten

Try adding the following to devenv.exe.config (in Common7\IDE folder):

尝试将以下内容添加到 devenv.exe.config(在 Common7\IDE 文件夹中):

<configuration>
  <system.net>
    <settings>
      <servicePointManager expect100Continue="false" />
    </settings>
  </system.net>
</configuration>

This is a known issue with some proxy servers that will be addressed in a future release.

这是某些代理服务器的已知问题,将在未来版本中解决。

回答by cbeuker

The following worked for me, I got this from the blog entry listed below.

以下对我有用,我从下面列出的博客条目中得到了这个。

in the devenv.exe.configfile, in the <system.net>section add:

devenv.exe.config文件中,在<system.net>部分添加:

<defaultProxy useDefaultCredentials="true" enabled="true">
    <proxy usesystemdefault="True" />
</defaultProxy>

reference: http://gurustop.net/blog/2010/08/10/visual-studio-2010-extension-manager-online-gallery-behind-internet-proxy/

参考:http: //gurustop.net/blog/2010/08/10/visual-studio-2010-extension-manager-online-gallery-behind-internet-proxy/

回答by Ricardo Campos

I had to do a bit of all the above to get mine working. My system.netsettings:-

我必须做一些以上的工作才能让我的工作。我的system.net设置:-

<system.net>
    <defaultProxy useDefaultCredentials="true" enabled="true">
        <proxy proxyaddress="http://your.proxyserver.ip:port"/>
    </defaultProxy>
    <settings>
        <ipv6 enabled="true"/>
        <servicePointManager expect100Continue="false" />
    </settings>
</system.net>

回答by Gio2k

In my case, Visual Studio refused to read the settings from internet explorer. I finally got it to work by explicitely giving the url to the proxy and setting the servicePointManager expect100Continue to false. To manually add the proxy address, the xml looks like this:

就我而言,Visual Studio 拒绝从 Internet Explorer 读取设置。我终于通过明确地将 url 提供给代理并将 servicePointManager expect100Continue 设置为 false 使其工作。要手动添加代理地址,xml 如下所示:

<defaultProxy>
    <proxy proxyaddress="http://your.proxyserver.ip:port"/>
</defaultProxy>

回答by Carl Onager

For me what worked was going into Internet Explorer, opening the Tools > Internet Options > Connections > LAN Settings dialog, and changing the state of the 'Automatcially detect settings' and the proxy server settings. Depending on your connection type you may need to change these settings to get this working.

对我来说,进入 Internet Explorer 的方法是打开工具 > Internet 选项 > 连接 > LAN 设置对话框,然后更改“自动检测设置”和代理服务器设置的状态。根据您的连接类型,您可能需要更改这些设置才能使其正常工作。

回答by RandomIEsettingsSufferer

For me, having IE proxy did not help. However setting the OS proxy on windows server 2008 r2 x64 helped.

对我来说,拥有 IE 代理并没有帮助。但是,在 Windows Server 2008 r2 x64 上设置操作系统代理会有所帮助。

netsh winhttp set proxy myproxy.corp.com:80

netsh winhttp 设置代理 myproxy.corp.com:80

and to view the settings: netsh winhttp show proxy

并查看设置:netsh winhttp show proxy

回答by Robert Koch

For me, the above config changes does not work in you're in a Windows Active Directory environment. Comment whatever you put in above out altogether.

对我而言,上述配置更改在您处于 Windows Active Directory 环境中时不起作用。将您在上面输入的内容完全注释掉。

What I did:

我做了什么:

Go into Credentials Manager (Windows 7 or 8) and add the proxy credentials of whatever username that comes up in the proxy dialog, e.g. VSCredentials_corp-proxy.domain.local/username and then your Windows password.

进入凭据管理器(Windows 7 或 8)并添加代理对话框中出现的任何用户名的代理凭据,例如 VSCredentials_corp-proxy.domain.local/username,然后添加您的 Windows 密码。

Bada bing, I'm in!

八大兵,我来了!

回答by Mohammad tanvirul islam

you can add following settings in devenv.exe.config

您可以在 devenv.exe.config 中添加以下设置

<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true">
   <proxy usesystemdefault="True" />
</defaultProxy>
<settings>
    <ipv6 enabled="true"/>
    <servicePointManager expect100Continue="false" />
</settings>