IIS7 Impersonation doesn't work to access TFS repository

后端 未结 3 660
故里飘歌
故里飘歌 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:14

    I think you may have a "double hop" problem.

    0 讨论(0)
  • 2020-12-10 17:27

    Who is the app pool for the IIS app running as? By default, I think it's one of IIUSR accounts and not necessarily a domain account with credentials for the TFS server.

    0 讨论(0)
  • 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<WorkItemStore>();
    

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

    0 讨论(0)
提交回复
热议问题