【发布时间】:2013-12-06 18:56:18
【问题描述】:
我有关于 TFS API 的代码,并且工作正常。但是当我在不同的网络域上尝试时,它得到了错误。错误是 - "TF30063: 你无权访问http:///example:8181//tfs//。"
但是我用来在代码中连接 TFS 服务器的用户 AC,从 VS-2012 和 Web URL 可以,但不能从 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 的连接的代码。
标签: tfs tfs-sdk tfs-security