C# 使用C连接到TFS 2010#
我尝试使用C#连接到TFS。 这是我的密码:C# 使用C连接到TFS 2010#,c#,visual-studio-2010,tfs,C#,Visual Studio 2010,Tfs,我尝试使用C#连接到TFS。 这是我的密码: Uri url = new Uri("http://serverpath/DefaultCollection"); NetworkCredential nc = new NetworkCredential("ID", "Password", "Domain"); TfsTeamProjectCollection coll = new TfsTeamProjectCollection(url, nc
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."}
关于可能出现的问题的任何解决方案???看起来您缺少URI中的端口号和
/tfs
通常,TFS 2010 URI是
http://server:8080/tfs/DefaultCollection
检查服务器日志可能重复。hmm!我无法查看服务器日志。。我没有访问它的权限。你知道服务器路径是否也需要端口号吗?在我的代码中,我总是包含端口号。不确定是否需要。另外,典型的VS 2010路径是“”。这就是问题所在的“路径”!现在可以了。谢谢向上投票