Search code examples
visual-studiovisual-studio-2012tfstfvc

How can I resolve 'Source Control Access Denied' errors when connecting to TFS after joining my computer into a domain?


After I joined my computer to a newly setup domain (and consequently logging in to my new domain account on my machine) I constantly get an Access Denied error whenever visual studio connects to our remote TFS. My machine has a local account from which I first created the workspace way back then.

What I've tried to do is install TFS SideKicks in an attempt to Update Workspace Computer Name to no avail. When the update fails I get a: file access being denied at C:\ProgramData\Microsoft Team Foundation Local Workspaces\<guid>\PC-Name;<guid>\properties1.tf.

For the heck of it I went to the directory containing the said file and changed the ownership of the folder from .\MyAccountName to DomainName\MyDomainAccountName. I still got the error afterwards though.

I also tried changing the folder ownership of my local TFS governed folders, which didn't work too.

Another thing I tried, which works (but is a solution I don't particularly like) is setting the Workspace Permission from Private to Public.

As far as I know setting the workspace permission to public is an option for developers who share a workspace in a single machine. The reason I don't like this solution is because I'm the only user of this machine (it's just that I just joined in a domain which makes my machine believe there are two users).

I have this feeling that the errors are about some folder ownership issues that I can't seem to put my finger on.

If all else fails I may just have to live with my Workspace Permission to being set to Public OR just recreating my workspace altogether (worst case).

Edit: Another solution I tried was restarting Visual Studio 2012 after removing the Generic Credentials and Windows Credentials to our remote TFS in both my localmachine account (.\MyAccountName) and in my localmachine domain account (DomainName\MyAccountName). Still no luck.


Solution

  • I regenerated my own workspace again with the use of my new domain account, now I don't get the errors anymore.

    I had to make sure that I checked everything in, then deleted my old workspace associated with my localmachine local account, then created a new workspace with my domain account. I remapped my new workspace to the folders to which my old workspace was mapped too and it still worked.

    Answering my own question as reference for other people in the future.