I have code on TFS API and its working fine. But when i tried that on different network domain , it got error. Error is - "TF30063: You are not authorized to access http::///example:8181//tfs//."
But the user AC that i used to connect with TFS server in code, that is ok from VS-2012 and web URLs but not from TFS API. is there any dependency for different domain on TFS authentication?
code -
this.collection_string = "http:://abcd:8080/tfs/" + collectionName;
this.projectCollection = new TfsTeamProjectCollection(new Uri(this.collection_string), new NetworkCredential("username", "password", "domain"));
projectCollection.EnsureAuthenticated();
this.versionControllerServer = (VersionControlServer)this.projectCollection.GetService(typeof(VersionControlServer));
this.buildServer = (IBuildServer)this.projectCollection.GetService(typeof(IBuildServer));
Console.WriteLine("Connected successfully to the server");