I am behind a corporate proxy server which requires credentials. I have been trying to connect to a TFS server (on tfspreview.com) with MS Visual Studio Pro 2012
The situation is essentially that VS
is not set up to go through a proxy to get to the resources it's trying to get to (when using FTP). This is the cause of the 407 error you're getting. I did some research on this and there are a few things that you can try to get this debugged. Fundamentally this is a bit of a flawed area in the product that is supposed to be reviewed in a later release.
Here are some solutions, in order of less complex to more complex:
VS
.devenv.exe.config
add <servicePointManager expect100Continue="false" />
as laid out below:<configuration>
<system.net>
<settings>
<servicePointManager expect100Continue="false" />
</settings>
</system.net>
</configuration>
defaultProxy
settings as follows:<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy proxyaddress="http://your.proxyserver.ip:port"/>
</defaultProxy>
<settings>
...
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy usesystemdefault="True" />
</defaultProxy>
Hope this solves it for you.
This helped in my case :
This is just a hack. You need to do it regulary ... :-(
Best regards,
Alexander
I was getting an "authenticationrequired" (407) error when clicking the [Sync] button (using the MS Git Provider), and this worked for me (VS 2013):
..\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe.config
<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy proxyaddress="http://username:password@proxyip:port" />
</defaultProxy>
<settings>
<ipv6 enabled="false"/>
<servicePointManager expect100Continue="false"/>
</settings>
</system.net>
I think the magic for me was setting 'ipv6' to 'false' - not sure why (perhaps only IPv4 is supported in my case). I tried other ways as shown above, but I move the "settings" section AFTER "defaultProxy", and changed "ipv6", and it worked perfectly with my login added (every other way I tried in all other answers posted just failed for me).
Edit: Just found another work around (without changing the config file). For some reason, if I disable the windows proxy (it's a URL to a PAC file in my case), try again (it will fail), and re-enable the proxy, it works. Seems to cache something internally that gets reset when I do this (at least in my case).
I was having the same problem, and none of the posted solutions worked. For me the solution was:
This prevented the proxy being used, and I could then authenticate without problem.
The solution that worked for me in both Visual Studio 2013 and Microsoft Test Manager (MTM) was to ensure that both devenv.exe.config and mtm.exe.config included this configurations section:
<system.net>
<settings>
<ipv6 enabled="true"/>
<servicePointManager expect100Continue="false"/>
</settings>
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy usesystemdefault="True" />
</defaultProxy>
</system.net>
MTM did not have a system.net setting and the whole section was added immediately following the closing xml tag </appSettings>
.
I got this error when running dotnet publish
while connected to the company VPN. Once I disconnected from the VPN, it worked.