authentication failed while connecting to tfs using tfs api

后端 未结 3 1082
遇见更好的自我
遇见更好的自我 2021-01-23 22:28

I am facing a strange issue.I want to connect tfs server using tfs api programmitcally. Even after giving proper authentcaion crediatials it is failing.But if I do it manually b

3条回答
  •  后悔当初
    2021-01-23 23:00

    Have you tried doing it this way..

    TfsTeamProjectCollection collection = new TfsTeamProjectCollection(
        new Uri(http://server:8080/tfs/DefaultCollection,
        new System.Net.NetworkCredential("domain_name\\user_name", "pwd"));
    collection.EnsureAuthenticated();
    

提交回复
热议问题