TF31002: Unable to connect to Team Foundation Server 2013 - visual-studio-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

Related

Visual Studio Encounters 403 Error Connecting to DevOps Project

One of my developers is receiving the following message from Visual Studio 2017 Enterprise when trying to connect to one of our DevOps projects and we've tried everything we can think of and everything we've found from searching Stack Overflow and the internet in general just hasn't worked.
Here's the error from Visual Studio:
We could not add the account
The browser based authentication dialog failed to complete. Reason:
The server understood the request, but is refusing to fulfill it.
What we've tried
Deleting the folders Team Foundation, VisualStudio, VisualStudio Services, VSCommon, and vshub located in %userprofile%\AppData\Local\Microsoft
Deleting everything from Windows Credential Manager.
Authenticating via browser (success).
Repository is hosted on dev.azure.com.
From what I understand, this is an HTTP 403 error which means the user successfully authenticated and that they just don't have permissions to view the requested resource. Permissions in DevOps are identical to other users that don't have any issues. We have 1 group for the developers and if you're in that group, you have all necessary permissions so I'm confident their permissions are identical to the other devs that aren't having any issues.
I think I understand what this error means for websites in general, however I seem to be at a loss for what either Visual Studio or Azure DevOps wants us to do specifically to alleviate this error.
The browser based authentication dialog failed to complete.
Once it was a known issue in old VS2015 and VS2017, but I can't reproduce it on my latest VS2017 15.9.23. Here're some tips you can follow to resolve that issue:
1.Update VS2017 to latest 15.9.23 version.
2.Navigate to VS installation path C:\Program Files (x86)\Microsoft Visual Studio\2017\VsEdition\Common7\IDE and run devenv.exe /resetsettings and devenv.exe /resetuserdata to reset the VS settings and userdata. From Joyce Lin.
3.Check your registry settings and empty the China endpoint if it exists. Check this one. Now try to log in the VS...
4.If the issue persists after #3, you can:
Open Visual Studio
Click Help > Send Feedback > Report a problem
An instance of Visual Studio Feedback will open
Attempt to sign in using your MS account
If sign in is successful, check if you are signed into Visual Studio
Hint from Nathan Timblin.
Hope all above helps :)

TF30063 error from Visual Studio Team Explorer but connected from the web

We are trying to setup TFS for our project installed in a Windows Server. All the collection(s) and projects are already created in TFS but while connecting through Visual Studio 2015 Team Explorer we are getting the below error in mapping section:
TF30063: You are not authorized to access xx.xxx.xxx.xx\ABCDEFGH.
While the same user is able to connect the TFS Collection from IE/Chrome.
Have you ever login the VS Team Explorer with other accounts? Can you connect to the TFS on another client machine?
Anyway, please try below ways to narrow down the issue:
Log out of Visual Studio Online from all browsers and VS.
Remove the existing credential from credential manager(Control panel > Credential manager, which contained the previous password)
Clear cache from C:\Users\ [your username]
\AppData\Local\Microsoft\Team Foundation{version}\Cache password.)
Run "devenv /resetuserdata" to clear your logon for Visual Studio.
Let it finish, it may take a while.
Launch Visual Studio, connect to the TFS project again with your
account.
You can also reference this similar thread: Error TF30063: You are not authorized to access ... \DefaultCollection

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.

When connecting to TFS2010 server ,VS2010 always crashed without any error message

I was working on VS2010 with TFS 2010. Everything is OK until our TFS server power outage. When connecting to server again,VS always crashed. Now we had to keep on offline mode. Restart the server serval times, nothing worked.
To narrow down your issue, you can try below methods:
Load the web portal in a browser (Judge whether its related to TFS server)
Connect to TFS with another user account on another machine.
Clear TFS local cache
http://www.ewaldhofman.nl/post/2009/07/06/Clear-the-cache-of-TFS.aspx and VS cache in appdata folder.
For TFS 2010 the default path: C:\Users\XXX\AppData\Local\Microsoft\Team Foundation\2.0\Cache
If you still can't solve it, check Event log which related to TFS. Also go through VS logs looking for the connection attempt and rejection reason.

Connecting to Team Foundation Server (TFS) with proxy authentication

Yesterday I created a new project in Codeplex. I created a connection from Visual Studio to the TFS server I was assigned and uploaded my solution successfully. Today I'm trying to connect again to the Codeplex TFS server to work on the solution. When I try to open it, I get the error:
Team Foundation Server
https://tfs06.codeplex.com/ does not
exist or is not accessible at this
time.
The remote server returned an error:
(407) Proxy Authentication Required.
The corporate environment I'm using does use proxy authentication but this wasn't an issue yesterday. Any ideas on why it worked then and how to make it work now?
Do you want to try refreshing the start page in Visual Studio (View, Other Windows, Start Page)? Sounds bizarre but the following forum post suggest that this might work...
http://social.msdn.microsoft.com/Forums/en-US/tfssetup/thread/c46afd34-09ea-4505-a34e-b378cb35138d
Visiting the Start Page (under View, Other Windows, Start Page) as recommended by Martin seems to reset the proxy authentication in some way.
An authentication prompt will then appear by going to Tools, Connect to Team Foundation Server, and selecting the server from the dropdown. Going to File, Source Control, Go Online then reconnects the solution.

Resources