【发布时间】:2010-08-11 20:44:26
【问题描述】:
我必须通过 API 连接到 TFS,当我在我的局域网中时,它已经可以正常工作了。 但现在我必须通过 webproxy 连接到 TFS。我可以通过浏览器连接到 serverstatus.asmx。 我已经尝试设置环境变量并将属性添加到 app.config - 但没有成功。 现在我尝试对 httpwebrequest 做同样的事情
System.Net.HttpWebRequest request = System.Net.WebRequest.Create(tfs_uri) as System.Net.HttpWebRequest;
request.Credentials = tfs_cred;
System.Net.WebProxy p = new System.Net.WebProxy("http://proxy.local.lan:8080/");
p.UseDefaultCredentials = true;
request.Proxy = p;
System.Net.WebResponse response = request.GetResponse();
此代码可以连接到 tfs.如果我删除代理定义并将 defaultProxy 标记添加到 app.config - 我在连接 TfsConfigurationServer 对象时收到相同的错误消息。 我的假设是:TFS API 不支持网络代理。这是正确的吗?
谁能告诉我我的假设是错误的?
【问题讨论】: