IIS7 Impersonation doesn't work to access TFS repository

后端 未结 3 693
故里飘歌
故里飘歌 2020-12-10 17:04

I\'m trying to build an ASP.NET page that adds a work item in TFS.

I have enabled impersonation and Windows authentication:



        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-10 17:31

    Based on this article, it's worth a shot to add EnsureAuthenticated();

    TfsTeamProjectCollection prjCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("xxx"));
    prjCollection.EnsureAuthenticated();
    WorkItemStore store = prjCollection.GetService();
    

    I haven't ever tried this, so I can only hope it 'll work.

提交回复
热议问题