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