I'm attempting to connect to TFS Preview from a C# application.
At the moment, I'm stuck trying to authenticate. I've added a reference to the TFS 2010 DLLs (I believe that these will enable me to connect, please correct me if I am wrong!) and my test case is as simple as. The URL I am trying to connect to is in the form https://MYSERVERNAME.tfspreview.com/DefaultCollection
var teamProjectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(workPath, new UICredentialsProvider());
teamProjectCollection.EnsureAuthenticated();
This fails with the following exception.
Team Foundation services are not available from server https://MYSERVER.tfspreview.com/$/defaultcollection. Technical information (for administrator): TF400813: Resource not available for anonymous access. Client authentication required.
I had hoped that providing a UICredentialsProvider
in the factory method creating the team project collection that it'd use this to provide authentication. The TFS Preview service uses Windows Live authentication, but I had hoped that this would be covered.
Pointers in the right direction greatly appreciated!