2016-03-03 167 views
1

为了访问互联网,安装了我的TFS 2015的计算机需要进行身份验证并通过代理服务器。显然,它不需要以任何方式访问网页。但是,我的TFS门户网站主页上的新闻面板会从网页中获取新闻。我可以看到在事件日志中出现以下错误:代理服务器后面的TFS 2015

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 23.52.183.215:80 
    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) 
    at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) 
    --- End of inner exception stack trace --- 
    at System.Net.HttpWebRequest.GetResponse() 
    at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) 
    at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) 
    at System.Xml.XmlTextReaderImpl.FinishInitUriString() 
    at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver) 
    at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext) 
    at Microsoft.TeamFoundation.Server.WebAccess.Controllers.ApiCommonController.GetNews(Int32 maxCount) 

正如你可以从事件GetNews方法上看到ApiCommonController是无法获取的数据。

我很想设置运行TFS应用程序池的用户(我的TFS服务帐户)的代理访问权限,并且我尝试在IIS配置编辑器中配置system.net/defaultProxy,但没有成功。

有谁知道如何让TFS通过代理服务器上网?

感谢

回答

2

我发现使它的工作方式。在C:\ Program Files \ Microsoft Team Foundation Server 14.0 \ Application Tier \ Web Services中,有一个由TFS Web Services使用的web.config文件。

您应该编辑它,并添加以下内容:

<system.net> 
    <defaultProxy> 
    <proxy usesystemdefault="True" proxyaddress="http://swg.eu.myproxy.com:8080" bypassonlocal="True"/> 
    </defaultProxy> 
    </system.net> 

设置这个,作出正确的我的新闻负荷和日志中没有更多的错误。

希望它有帮助!

Mario

0

设置用户代理访问,并在IIS配置配置system.net/defaultProxy之后。

  • 请重新启动VS和您的机器。这些更改可能不会立即生效 。
  • 临时禁用任何防火墙(尤其是Windows防火墙)和 防病毒软件。
  • 另外请确保您已在代理服务器的设置中检查Bypass proxy server for local addresses

enter image description here

相关问题