Reputation: 44706
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!
Upvotes: 5
Views: 2850
Reputation: 114641
Download and install the Object Model for Team Foundation Server 2010SP1 and then install the Visual Studio 2010 SP1 Forward Compatibility GDR. Though this installer may look to only apply to Visual Studio 2010, it will happily update your Object Model installation if it's installed stand-alone.
Upvotes: 0
Reputation: 44706
I have found that you cannot connect to TFSPreview using the TFS2010 DLL's, most likely because of the web credentials that need to be provided in order to access the site.
By adding a reference to the TFS2012 DLLs (which come with the Visual Studio 2012 RC at %PROGRAMFILESX86\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0
) I was able to successfully connect.
Upvotes: 2