I\'m trying to build an ASP.NET page that adds a work item in TFS.
I have enabled impersonation and Windows authentication:
I think you may have a "double hop" problem.
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.
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.