71

Latest Comment

I believe my problem occurs when using Nuget, however, if you are reading because of the TF30063 error. Have a look at the answer I provided and accepted.

Original Post

I am getting this error message when I try to check out. This happens randomly and can occur even if minutes ago the same instance of visual studio allowed me to check something else out for edit. enter image description here

The current workaround is to reopen VS2010.

Using W7x64, vs2010 ultimate with TF2010 and sql2008 on my local dev machine. I am not part of a domain. I am the administrator of this computer.

Additional 2011-08-09

When the problem occurrs, I "close solution" under file. And then reopen the solution. I then get a uid/pwd box. I put my admin uid/pwd into it and then get a further error message. Again, closing vs2010 and reopening solves the issue.

enter image description here enter image description here

Additional: 2011-08-30

I believe this has to do with nuget. I have provided an answer and so far after many months I have not had a TFS error. Where I should have had an error given the types of operations I have been performing which were identical to the scenarios making it fail.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
Valamas
  • 24,169
  • 25
  • 107
  • 177
  • 1
    Sometimes I got sameproblem. I assume it has got to do with some kind of connection loss. But I'm also interessted in any hint on that topic – Boas Enkler Jul 13 '11 at 04:49
  • Out of curiosity have you got your TFS credentials stored in the Windows Credential Manager? Just trying to understand the problem in a little more detail. – Richard Banks Jul 28 '11 at 02:50

7 Answers7

88

I noticed that the problem occurred mostly after i installed a nuget package. After adding a nuget package i found that I could not check out. Restarting Visual Studio helped.

Based on this discussion:

http://nuget.codeplex.com/discussions/254328

i used this solution which appears to be working:
(I have copied the solution here if ever the webpage disappears)

Control Panel / Internet Options / Security Tab
Select "Local Intranet"
Click Sites button
Click Advanced Button
Add your TFS server http address to the list. e.g. http://tfs
Restart Visual Studio

Source: http://blog.rthand.com/post/2011/08/26/Fixing-combination-of-NuGet-and-Team-Foundation-in-workgroup-configuration-401-Unauthorized.aspx (Go straight down to The Solution half way down).

Don't let the Internet Options part fool you. I do not use Internet Explorer and this solved my issue.

Valamas
  • 24,169
  • 25
  • 107
  • 177
  • 8
    Wow what a random ridiculous bug I never would have solved. Thank goodness for stackoverflow haha. – Alec Nov 29 '11 at 21:50
  • 2
    Thanks ! This problem bugged me since > 12 months (long before i installed nuget) but with a tfs server on the internet. – Softlion Jan 18 '12 at 09:54
  • 1
    We've been putting up with this for way too long! The second blog post worked for me. – SouthShoreAK Apr 02 '12 at 15:52
  • 1
    Thank you for sharing this - I am amazed that Microsoft did not fix this bug - it has been there for quite for a while. +1 – gimlichael Jun 05 '12 at 18:11
  • Worked for me as well. You saved my time. – Dharmik Bhandari Mar 13 '14 at 13:03
  • Good grief! Thank you! My W7 desktop worked fine but my W8 laptop refused with that misleading authentication error until I messed with Internet Settings as you suggested. How silly. – Jon Apr 09 '14 at 09:18
  • did it for me also. although i am wondering now whether if i was logged into visual studio online via the browser if it would have done it. anyway, thanks for that. – Andrei Bazanov Feb 15 '16 at 21:52
  • Bizarre! I had no problems until Windows required me to change my password. I could download the JSON file via a browser, but VS was giving the 401 error. This fixed it... Thanks! – Ron Rebennack Feb 28 '18 at 16:45
3

I found this issue and the accepted solution didn't work for me. For me the problem occurred when trying to add a NuGet package to my project (through either the console or the GUI) and it would show the login prompt but not accept my user/password. It would try around 4 times and then fail and roll back the installation.

It turns out for me the issue was that I had Fiddler open and as soon as I closed it (to undo the proxy settings) I was then able to install the package without any issue. I didn't even have to restart Visual Studio to get it working.

Just thought I'd share this for the next person who comes across this issue.

Arrya Regan
  • 1,104
  • 8
  • 22
2

I want to add a solution for people who are using VisualStudio online. My problem was that I was logged into VS2013 with the wrong Microsoft Account.

josh-sachs
  • 1,749
  • 2
  • 15
  • 19
  • Thanks for this for VisualStudio online. After reading this, I checked my details in VS and it had the yellow [!]. A login + restart of VS and all's good (at least as far as this error goes...) – freedomn-m Jan 04 '16 at 15:09
1

I would like to point that the accepted solution didn't work for me - probably it is for IE users.

My fix was to "clear the package cache"

  1. Open VS
  2. Go to Tools-> Options
  3. Open "NuGet Package Manager" and select General
  4. Click in the button: "clear the package cache"
ivarni
  • 17,658
  • 17
  • 76
  • 92
Mata
  • 21
  • 3
0

When I had this problem I checked Event Viewer on my TFS machine and it showed a bunch of insufficient permissions Windows Sharepoint Service errors. I ended up just disabling the Sharepoint aspects of TFS since I wasn't using them anyways.

kenwarner
  • 28,650
  • 28
  • 130
  • 173
  • 1
    thank you for adding things to investigate. The problem is occurring now and I cannot see any related Event viewer events. I do not have sharepoint services too. – Valamas Aug 09 '11 at 05:03
-1

Got the error TF30063: You are not authorized to access Collection when comparing or merging the solutions in tfs 2012. I found that enabling and disabling the windows authentication in IIS did randomly fix the error but found the disk space issue, Once i cleared it, and enabled the windows authentication for TFS in IIS, it was a fix for me.! -Pasha

Pasha
  • 798
  • 1
  • 5
  • 9
-2

This answer got me far enough to solve:

Control Panel / Internet Options / Security Tab Select "Local Intranet" Click Sites button Click Advanced Button Add your TFS server http address to the list. e.g. http://tfs Restart Visual Studio

On our internal network, for some reason, our computers don't always recognize other computers as being part of the domain - resulting in connections being sporadic/intermittent. My user had a restricted list set by domain policy, so I couldn't edit it. However, I could change the connection from just the computer name to the computer's fully qualified domain name and that appears to have solved the problem.

Mark
  • 877
  • 9
  • 4