Authenticating on TFS 2010

Posted by keynan21 on Stack Overflow See other posts from Stack Overflow or by keynan21
Published on 2010-05-13T19:06:11Z Indexed on 2010/05/20 11:10 UTC
Read the original article Hit count: 222

Filed under:

Hi,

I'm having trouble authenticating as a specific user on MS Team Foundation Server. In older versions it would look like:

teamFoundationCredential = new System.Net.NetworkCredential("<USERNAME>", "<PASSWORD>", "<DOMAIN>");

TeamFoundationServer tfs = new TeamFoundationServer("http://mars:8080/", teamFoundationCredential);

Can some one tell me the equivilent for the 2010 version. So far I have:

ICredentialsProvider cred = null;

tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("http://asebeast.cpsc.ucalgar.ca:8080/tfs/DefualtCollection"));

tfs.EnsureAuthenticated();

Thanks

© Stack Overflow or respective owner

Related posts about tfs