【问题标题】:TFS API isn't working from different domainTFS API 不能从不同的域工作
【发布时间】: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


【解决方案1】:

尝试使用您的 TFS URL 中的 IP 地址而不是其名称来访问您的 TFS。实际上,我之前遇到过同样的问题,通过IP地址访问它就解决了。 另一种可能的解决方案是在本地计算机中添加 TFS 服务器的主机条目。

【讨论】:

    猜你喜欢
    • 2014-08-05
    • 2022-01-24
    • 2020-06-16
    • 2013-01-11
    • 2022-01-13
    • 2016-10-10
    • 2018-10-02
    • 2011-05-30
    • 1970-01-01
    相关资源
    最近更新 更多