2
votes

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");
1
Can you show your code? Specifically the code that creates the connection to TFS.James Reed

1 Answers

1
votes

Try to access your TFS using IP address in your TFS URL instead of it's name. Actually, i faced the same issue earlier and it was resolved by accessing it via IP address. Another possible solution is add a Host entry of your TFS Server in your local machine.