Cannot connect to any online resource
Asked Answered
I

9

82

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:

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?

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

Incidentally answered 18/5, 2010 at 16:27 Comment(1)
I added the config additions from all three answers before mine worked XDKurth
W
135

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

<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.

Ware answered 30/6, 2010 at 17:46 Comment(6)
Thanks. I am using ipcop as my home firewall, and visual studio 2010 extension manager was not able to connect to the internet. This fixes the problem for the error message "trying to connect."Review
In my case it took an extra step: I had to configure the right proxy in my InternetExplorer as well, setting it in my default browser did not help. Is probably equivalent to setting your system default network proxy.Volin
This worked for me. The only thing is if you already have a system.net node, then only add the <servicePointManager expect100Continue="false" /> under the setting node.Broke
Thanks, I had the same problem in C# Express 2010, the file to modify was VCSExpress.exe.configAcrolein
For Visual Studio 2012 Express the file is WDExpress.exe.configMireillemireles
I want to use the proxy for accessing internet (nuget Package Manager) and not use it for the project's Team Foundation Server (192.168.1.5 on local network), could it be done? because I have set an exception for this IP in Internet Options>Connections>Advanced menu and it's still trying to use the proxy for TFS causing some http 407 error. I'm using VS Express 2013.Toffic
H
31

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

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

<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/

Hybrid answered 16/8, 2010 at 19:46 Comment(0)
S
25

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

<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>
Saskatoon answered 26/10, 2011 at 8:9 Comment(2)
The file to modify is: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.configAmylo
Thanks a Lot! Worked to me, but I had to change from <proxy proxyaddress="your.proxyserver.ip:port"> to <proxy usesystemdefault="True"/>Achaea
C
13

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:

<defaultProxy>
    <proxy proxyaddress="http://your.proxyserver.ip:port"/>
</defaultProxy>
Cittern answered 14/2, 2011 at 13:4 Comment(0)
G
5

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.

Grattan answered 3/9, 2012 at 8:32 Comment(0)
R
0

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

netsh winhttp set proxy myproxy.corp.com:80

and to view the settings: netsh winhttp show proxy

Resistive answered 6/2, 2014 at 11:52 Comment(0)
C
0

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.

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.

Bada bing, I'm in!

Comment answered 4/3, 2014 at 16:7 Comment(0)
H
0

you can add following settings in devenv.exe.config

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

Hauger answered 22/10, 2014 at 10:19 Comment(0)
G
0

I know this is old, but for anyone who needs to go back and use Visual Studio 2010 and is running into this, I found the following article and fix.

NuGet Package restore failed...

Note that the solution has a command you're supposed to run, but for some reason the person included an invalid portion into the line "< code >". Remove that code portion of the command you're supposed to run and boom. worked like a charm. Didn't have to do any other fixes noted above.

Just in case the link above breaks the fix is:

For old versions of Visual Studio such as Visual Studio 2012 and Visual Studio 2013, you may get this similar errors. The cause is related to TLS and certificate. I think you can try this: open the NuGet Package Management Console(Tools > NuGet Package Manager > Package Manager Console)(If you can find it in VS 2012. Not very sure if it exists in VS 2012, as VS 2012 is an old version of VS) => enter following command line:

PM> [Net.ServicePointManager]::SecurityProtocol=[Net.ServicePointManager]::SecurityProtocol-bOR [Net.SecurityProtocolType]::Tls12
Gaultheria answered 12/5, 2023 at 17:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.