Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 546
Don Avatar asked Mar 20 '16 03:03

Don


People also ask

How do I add a Team Foundation Server in Visual Studio 2012?

Open Visual Studio 2012 and from the Team menu, click Connect to Team Foundation Server. Click the Servers button. From the Add/Remove Team Foundation Server window, click the Add button.

How does Visual Studio Connect to Team Foundation Server?

From the Visual Studio Tools menu, select Options, then select Source Control > Plug-in Selection. Select Visual Studio Team Foundation Server. For Visual Studio Team Foundation Server, enter the name and port number for the Azure DevOps Proxy Server. Select Use SSL encryption (https) to connect.

How do I access team services in Visual Studio?

Open the Project in Visual StudioClick on Open in Visual Studio. Click on Servers to add the VSTS URL which will then show up for the projects created. You will need to sign in with the VSTS account which you created earlier.


2 Answers

According to this blog the solution is (and Yes it worked for me)

  1. Close all instances of Visual Studio
  2. 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)
  3. 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.
  4. Delete everything in that Cache folder.
  5. Start Visual Studio and build the project
like image 193
Hakan Fıstık Avatar answered Oct 14 '22 18:10

Hakan Fıstık


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:

enter image description here

Click the "Certificate Error" in the address bar:

enter image description here

Then select "View Certificates":

If clicking "View Certificates" doesn't work, right click on page > Properties > Certificates.

enter image description here

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

enter image description here

Once you have the install certificate button available, select “Install Certificate”.

enter image description here

This will launch the Certificate Import Wizard. Make sure to Choose the option “Place all certificates in the following store” and select browse.

enter image description here

Select Trusted Root Certification Authorities and click Ok.

enter image description here

Click Finish on Completing the Certificate Import Wizard:

enter image description here

Click yes on the security warning to install the certificate.

enter image description here

=================================================

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.

like image 40
Jeremy Thompson Avatar answered Oct 14 '22 16:10

Jeremy Thompson