Unable to connect to TFS server in Visual studio community 2015 - visual-studio

When I try to connect to a local TFS server in visual studio community 2015 Visual studio hangs and then crashes... I've tried the following: clearing the TFS cache, uninstalling the git plugin, disabling my AV, re-installing Visual Studio 2015... I get to the part where I need to add the server but as soon as I click ok after entering the IP address something goes wrong. It shows me the dialog where I have to enter my username/password and then hangs/crashes... I use a screen reader and even though it doesn't show anything on the screen when this happens I sometimes hear windows security right before it crashes... Any idea what else I can try?

You can try below ways to narrow this issue:
Try to use your account to connect TFS on another machine.
Try to connect to TFS with another account on your machine.
If you are using proxy in IE, disable the proxy and try again.
Disable your Antivirus software and Firewall on your machine
and try the connect again.
Try to connect to TFS web portal in IE such as http://your
server:8080/tfs/defaultcollection/Your GIT Project/ to see if this
works well.

Related

another instance of an application is already in process - visual studio 2013

I am attempting to log into Microsoft Visual Studio, so I can connect to TFS, and I am unable to login.
After I enter my credentials, it acts like everything is good to go but I do not login in the top right. When I hover over Sign in I get an error stating "Another instance of the application is already in the process of signing in."
I did just remove my user settings because of another issue not allowing me to actually connect to anything because I just branched a product.
I have attempted to shutdown the computer, restart visual Studio, reinstall visual studio and I also reinstalled microsoft office; as well as. added the two sites mentioned from another forum to my trusted sites (*.accesscontrol.windows.net)(https://app.vsaex.visualstudio.com/me?mkt=en-US). if anyone has any information on this that would be greatly appreciated. Thank You
Just try below things to narrow down the VS sign in issue:
Disable any Anti-Virus or Anti-Spyware software on your
computer, navigate to <Visual Studio Installation Path>\Common7\IDE
and run the following commands: devenv.exe /resetuserdata, it will
take a couple of minutes to run as Visual Studio cleans up and sets
itself back to its original state.
Close visual studio --> delete the following registry key
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSCommon\ConnectedUser\IdeUserV2
--> restart visual studio --> Try and sign in
Remove credenticals from Credential Manager (Control Panel\All
Control Panel Items\Credential Manager)
Clean VS caches:
Close Visual Studio (ensure devenv.exe is not present in the Task
Manager)
Delete the %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache directory
Restart Visual Studio.
Open the following file in notepad:
C:\windows\system32\drivers\etc\hosts
Add
65.52.55.39 and app.vsspsext.visualstudio.com then re-open vs and try the sign in again.
However it's not necessary to sing in Visual Studio if you just want to connect to TFS. You can only manage the connections in Team Explorer. When you add a new TFS server and try to connect, it will prompt to enter the credetical. Just enter the appropriate TFS credentical to connect the TFS server.

TF400324: Team Foundation services are not available from server <Server/CollectionName> in Visual Studio 2012

When I open my existing solution in Visual Studio 2012 professional, I got the above error. This used to work but something messed up after the computer is rebuilt.
I have installed Visual Studio 2015 Community and can connect to the same
collection correctly.
I also tried to use a browser to connect to the same collection. It works fine also.
Cleaning all files in AppData\Local\Microsoft\Team Foundation\4.0\Cache does not work.
It should not be a firewall or proxy issue since Visual Studio 2015 works.
Anyone knows what is wrong with Visual Studio 2012 and how to fix it?
Edit:
This error can happen with later versions of TFS:
Team Foundation Error
TF400324: Team Foundation services are not available from server TFSServer\DefaultCollection.
Technical information (for administrator):
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xxx.xxx.xxx.xxx:443
According to this blog the solution is (and Yes it worked for me)
Close all instances of Visual Studio
Open the Task Manager and check if any TFS Services are running. Select each of them and click on End Process Tree (in my case I did not find any of them to End)
Browse to the folder %LocalAppData%\Microsoft\Team Foundation\
and then select the folder with your TFS version and go inside the Cache folder.
for example, in my machine the path was %LocalAppData%\Microsoft\Team Foundation\7.0\Cache and it should be the same on your machine with the difference of the TFS version folder name.
Delete everything in that Cache folder.
Start Visual Studio and build the project
I got this error in TFS2017. For me the problem was a Self-Signed Certificate.
Open the TFS URL in IE and you will see a Red Address Bar:
Click the "Certificate Error" in the address bar:
Then select "View Certificates":
If clicking "View Certificates" doesn't work, right click on page > Properties > Certificates.
If the Install Certificate button is hidden to make it visible you will have to Open Internet Explorer Options > Security > Sites > type the TFS server URL > Tick Require server verification > click Add. (If the dialog is disabled see the guide Trusted Sites Dialog is Disabled at the end of this answer).
Once you have the install certificate button available, select “Install Certificate”.
This will launch the Certificate Import Wizard. Make sure to Choose the option “Place all certificates in the following store” and select browse.
Select Trusted Root Certification Authorities and click Ok.
Click Finish on Completing the Certificate Import Wizard:
Click yes on the security warning to install the certificate.
=================================================
Trusted Sites Dialog is Disabled
You can check to see if the site is Trusted, on Windows 7 the path is:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey
The key should contain several string values with a name indicating the URL and numeric data indicating the zone, one of the following by default.
0 = My Computer
1 = Local Intranet Zone
2 = Trusted sites Zone
3 = Internet Zone
4 = Restricted Sites Zone
If the TFS site is not listed in the registry then add it manually. Restart Visual Studio and try to connect to the TFS server again from Visual Studio. Once you can connect you can also remove the TFS server from the Connection List. I suggest removing it and adding the FQDN url which will most likely already have a Trusted Site rule.
Edit
Hit this again. This time it was caused by a problem with a network card that was replaced on the weekend by our telecommunications provider.
This issue is happening when server is not responding, In my case server hosting TFS was down, we restarted and get connected.
Try clear both local TFS cache and Visual Studio Cache
clear visual studio cache under
%APPDATA%\Microsoft\VisualStudio
clear TFS cache under
%LocalAppData%\Microsoft\Team Foundation
...better late than never...
I just had a user run into same error TF400324 connecting VS2012 to TFS2015 (hosted in a virtual private cloud). TFS Web Access worked fine for her, but Visual Studio 2012 UI was stuck in offline connection.
FIX: She managed to get VS connected again after clicking Team Explorer > Connect | {TeamProject}, Then select desired Team Project below the TFS Server connection (see screenshot attached).
NOTES:
I suspect clearing client-side TFS cache might also fix, but all VS instances would need to be closed then "Connect to Team Project Connection" re-established. Just disconnecting and reconnecting VS to TFS did not clear the "offline" state.
Error she saw was in VS output window:
This solution is offline. [Team Foundation Server: {//TFS Collection URL}]
The solution was offline during its previous session and will remain offline.
TF400324: Team Foundation services are not available from server .
Technical information (for administrator):
Page not found.
NOTE: I recently moved TFS to different domain requiring SSH connection and localhost port mapping. I have users going offline much more frequently due to different proxy routing depending on whether they are at work or connected more directly to the Internet.
For me the fix was simply running Visual Studio (2010) as an administrator.
In my case, my company VPN my Host machine was connected to was preventing me to access the tfs on a VirtualBox VM, returning this exact error message.
We solved it by adding a specific exclusion to ESET / Kaspersky AntiVirus for the devenv.exe
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe"
Its been working great ever since.
I get basic idea from this link
Soluton for me was to run the standalone TFS installation. This is for 2017, but worked to fix my VS2019.
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=TeamExplorer&rel=15
Bit of background...
I'd been having this issue since 2017. Tried all the usual suggestions on here, cache clearing, config file editing etc. but would always have to come off my organisation's network to check code in, as it was proxy related. TFS was trying to connect to a proxy server ip that had been decommissioned, no one from the service desk could work out why. Couldn't find any reference to this old ip in any config files.
Installed VS2019 hoping it would solve the issue but it persisted. Eventually I thought of trying to uninstall it as a component and re-installing it. Couldn't find a way to do that but in my search I found the standalone installer for Team Explorer, albeit for VS2017.
After installing, I ran this, opened up Manage Connections in the Team Explorer connections page and did what I needed to connect to the repository from there. Worked first time. Closed Team Explorer 2017, opened my VS2019, and everything seemed fine in there as well.
Amazed my problem is finally solved!
This error is usually related to the TFS cache. Before you clear the cache folder, please make sure you have closed all instances of Visual Studio and also try to open Task Manager and check if any TFS Services are running. Select each of them and click on End Process Tree.
And also clear the server cache Server cache, the path like C:\ProgramData\Microsoft\Team Foundation\Web Access
Then restart Visual Studio and run as Administrator Mode.
More details you can refer this blog (archived version at the bottom) and also could try the better fix.
Note: Make sure you are working on a different workspace rather then VS2015's.
For me it was the windows firewall causing this problem : TF400324 The underlying connection was closed.

TF31002: Unable to connect to Team Foundation Server 2013

on my computer I have a problem with connection to TFS 2013 using Visual Studio 2013 and 2015. This problem occurs on only one machine. Other users in the net can work without problems. In the same time I can connect to projects on Visual Studio Online. Problem happened after switching a few times between projects. Nothing was installed or changed either on my computer or on TFS Server. I've got following error: "Technical information (for administrator): The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF".
I've check this article:
https://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k(vs.tfc.connecttotfs.unabletoconnect)&rd=true
But in section: "You receive this error when you try to connect to an on-premises TFS from your client computer " I didn't found solution. I also reinstalled Visual Studio but it didn't solved my problem.
How to solve this? Is there a way to check some logs or events to find a reason? Thanks in advance for your help.
Regards Pawel
To narrow down this problem, try the following actions:
1.check whether there is something wrong with user account
a) Connect to TFS with the same user on another machine.
b) Login in tfs web access in web browser with your account
2.Clear TFS local cache http://www.ewaldhofman.nl/post/2009/07/06/Clear-the-cache-of-TFS.aspx For TFS 2013 the default path: C:\Users\XXX\AppData\Local\Microsoft\Team Foundation\5.0\Cache

Visual Studio stopped working with our TFS Server after a windows update

Visual Studio had been working correctly with our TFS server, but after a windows update it broke.
Team Project was there, but when I tried to connect it gave me this error,
"Basic authentication requires a secure connection to the server."
I opened the Team Project Collection and it failed to connect. What's going on?
I tried few things initially, closing and reopening VS, deleting the Team Project Collection and try to reconnect ect...
The solution that did work:
Open up Windows Credential Manager (Control Panel > User Accounts > Manage your credentials)
Remove all entries for that TFS server
restart Visual Studios
it works again!

TF31002 Can't connect to TFS online from VS 2012

Problem
I'm using VisualStudio 2012 Ultimate v11.0.50727.1 Update 4 and VisualStudio 2013 Ultimate v12.0.21005 EL and I'm able to connect to TFS through any browser. But suddenly I can't connect to TFS at xxxxx.VisualStudio.com from within VisualStudio anymore. Yesterday I easily did a Check-In at work with the same account. but I can't connect to TFS at home.
This is the URL I'm using: (I've tried changing it a bit like adding /tfs or /DefaultCollection)
I'm stuck with this, I've tried different ways but none have worked so far and it's still giving me these errors: TF31002, TF300324 and TF205020
TF31002 (this error happens when trying to Add a new server)
TF205020: Could not connect to server ‘https://xxxxxx.visualstudio.com/defaultcollection’. This server was used in your last session, but it might be offline or unreachable. Confirm that the server is available on the network. To attempt to connect again, or to a different server, click ‘Connect To Team Foundation Server’ in Team Explorer or the Team menu.
TF400324: Team Foundation services are not available from server https://xxxxxx.visualstudio.com/defaultcollection.
Technical information (for administrator):
The underlying connection was closed: An unexpected error occurred on a send.
(The last 2 errors happen when VisualStudio is trying to login to tfs)
I've tried these:
Go to VisualStudio.com and Sign out from all browsers
Delete Cookies and Caches of IE10 (and test when IE has signed in to visualstudio.com or signed out of it)
Go to Regedit and set the DWORD to 0 in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundation\Instances
Browse to %LocalAppData%\Microsoft\Team Foundation\4.0\Cache and delete everything
Delete all credentials from Windows Credential Manager (and remove Link Online ID)
Installed VS2013
Installed Team Explorer 2013
Installed VS2012 Update 4
Installed a fresh copy of Windows 8
What I want.
After some long and desperate time of trying to connect to TFS online, Now I'm just looking for a way to Check-in my changes. (doing it by hand is not an option because there's a large number of changes and I can't even know which files are changed since last check-in)
I just saw this link and it totally worked for me after nothing else would: http://www.cnblogs.com/CuteNet/p/3556276.html
regedit:
Close all instances of Visual Studio 2013
Delete this folder in the registry (just “TokenStorage” – nothing else):
HKEY_CURRENT_USER\Software\Microsoft\VSCommon\12.0\ClientServices\TokenStorage
I had similar issue where I couldn't connect (TF31002) to TFS 2010 using VS 2010, 2012 and 2013 on my laptop but can connect from web and other servers just fine.
I tried almost all suggestions given by various sources online but had no luck.
I was getting ready to reimage tha laptop but as one last try I started comparing config's between another virtual machine (where the connection was successful) to my laptop. I found that in my laptop I have additional defaultProxy settings in 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config’
<system.net>
<defaultProxy>
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://XXX.X.X.X:XXXX" usesystemdefault="false"/>
</defaultProxy>
</system.net>
After deleting the above node completely I was able to connect to TFS 2010 successfully.
Hope this helps.
I've found a way to check-in all changes of the home computer at work computer.
Copy the local TFS folder from home computer (including the hidden $tf subfolder) to work computer.
Install Team Foundation Sidekicks for 2012
Search for the home computer name
Click on Update Workspace Computer Name
Go to Source Control Explorer and open Workspaces...
Check Show remote workspaces checkbox (if the home workspace is not shown)
Edit the home workspace
Remove current mapping
Map $/ to the local folder (which has $tf)
When click on Advanced It should look like this:
Switch to the new Workspace and done!
It seems to me that private workspace is what causing the problem, and I will try to change it to public after I checked in.
Edit
I've found another workaround which requires no workspace hacks. (This method is originally designed for recovering from wrong check-ins)
In Source Control Explorer select root (collection, not project)
click Compare folders
in source version section choose the latest safe version
in target path section browse to the not-checked-in folder
make sure both paths end with same name (e.g. $/MyProj and E:\FromHome\TFS\MyProj)
(set any additional settings...) and click OK
DoubleClick on files with different value of Yes and write down the names of those file that should be loaded from local folder (right part of screen probably shows local)
Open those files from Solution Explorer and overwrite them with local files
I faced the same issue few days back
1. Disable your firewall(not recommended)
2. Run VS 2013 in admin mode.
3. Disable antivirus or add TFS in whitelist.
4. Select connect to TFS and create a new project in another directory (Local copy)
5. Check the directory for access(Read only by default change the permissions)
6. try to check in now.
After changing the permissions to the local directory i was able to check in my changes.
I was having the same issues using Visual Studio 2013 Update 2 and for me the problem was Anti-Virus software (Kaspersky Endpoint Security 8). See this link: http://blogs.msdn.com/b/dstfs/archive/2014/07/24/can-t-connect-to-visual-studio-online-from-any-version-of-in-vs-quot-the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-send-quot.aspx
Check your URL first!
I had a problem with such URL:
https://domain-name.com
Turns out that symbol "-" where replaced with some special char ­. But Visual Studio 2012(2013) did not indicate that anyhow. Apparently it was not able to find such domain. As result same issue TF31002 and a day spent in research.
I was having a similar problem with Visual Studio Premium 2013 connecting to our project from inside VS. It kept returning TF31002, but I could access it with a browser.
From the browser I went to Home->Activities->Open New instance of Visual Studio and my tfs project loaded right into the Team Explorer frame.
Hope that helps.
I had the same issue when I wanted to connect to the TFS with Visual Studio. This solved my problem:
I used a VPN connection to the server
I used the ip address instead of the link given by the TFS (http://"ip address":8080/tfs instead of http://"link":8080/tfs)

Resources