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