var tfsCredentials = new TfsClientCredentials(new Microsoft.TeamFoundation.Client.WindowsCredential(), true);
TfsTeamProjectCollection teamCollection = new TfsTeamProjectCollection(new Uri(DomainConstants.BASE_ADDRESS), tfsCredentials);
return teamCollection;
I used this for authenticate to TFS from current windows loggedin user and get TfsTeamProjectCollection, It is worked fine when it run from visual studio (localhost), but when I deployed my project in Server it occurs an error
An error occurred while processing your request
on browser and error log
Message :TF30063: You are not authorized to access http://unicorntfs:8080/tfs/USP.
StackTrace : at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest() at Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout) at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
at Microsoft.TeamFoundation.Server.Classification.ListProjects() at Microsoft.TeamFoundation.Proxy.CommonStructureService.ListProjects()
at UnicornRMS.TimeManagement.Services.TFSTimeManagementServiceImpl.GetAllProjectsByUser(TfsTeamProjectCollection projCollection) at UnicornRSM.WEB.Controllers.TimeManagement.TimeManagementController.Index(Int32 weekNo)
How can I authenticate to TFS from current windows loggedin user
Thanks