2
我在TFS API上有代碼並且工作正常。但是,當我嘗試在不同的網絡域上,它有錯誤。錯誤是 - 「TF30063:您無權訪問http :: ///示例:8181 // tfs //」。TFS API不能在不同的域中工作
但我用來與代碼中的TFS服務器連接的用戶AC,這可以從VS-2012和網址中得到,但不能從TFS API中獲得。 TFS身份驗證中是否存在對不同域的任何依賴關係?
代碼 -
this.collection_string = 「HTTP :: // ABCD:8080/TFS /」 +集合名;
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");
你能顯示你的代碼嗎?特別是創建與TFS連接的代碼。 –