【问题标题】:connecting to TFS 2010 using C#使用 C# 连接到 TFS 2010
【发布时间】:2014-11-14 21:07:01
【问题描述】:

我尝试使用 C# 连接到 TFS。 这是我的代码:

         Uri url = new Uri("http://serverpath/DefaultCollection");

        NetworkCredential nc = new NetworkCredential("ID", "Password", "Domain");

        TfsTeamProjectCollection coll = new TfsTeamProjectCollection(url, nc);

        coll.EnsureAuthenticated();

我收到以下错误:

 The underlying connection was closed: An unexpected error occurred on a receive.

Inner Exception : {"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."}

关于可能是什么问题的任何解决方案??

【问题讨论】:

标签: c# visual-studio-2010 tfs


【解决方案1】:

您似乎缺少端口号,以及 URI 中的 /tfs。

TFS 2010 URI 通常为 http://server:8080/tfs/DefaultCollection。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-23
    • 2011-02-07
    • 2013-05-23
    • 2023-03-22
    • 2011-10-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多