Iis TFS 2015背后的代理

Iis TFS 2015背后的代理,iis,tfs,proxy,iis-8,tfs-2015,Iis,Tfs,Proxy,Iis 8,Tfs 2015,安装了my TFS 2015的计算机需要进行身份验证并通过代理服务器才能访问internet。显然,它不需要以任何方式访问web。但是,我的TFS门户主页概览中的“新闻”面板从web获取新闻。我可以在事件日志中看到以下错误: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed b

安装了my TFS 2015的计算机需要进行身份验证并通过代理服务器才能访问internet。显然,它不需要以任何方式访问web。但是,我的TFS门户主页概览中的“新闻”面板从web获取新闻。我可以在事件日志中看到以下错误:

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)
正如您从ApiCommonController上的事件GetNews方法中看到的,无法获取数据

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

有人知道如何让TFS通过代理服务器访问web吗


在为用户设置代理访问权限并在IIS配置中配置system.net/defaultProxy之后,谢谢

  • 请重新启动VS和您的计算机。这些改变可能不起作用 马上
  • 临时禁用任何防火墙(尤其是Windows防火墙)和 你正在运行的防病毒软件
  • 另外,请确保您已检查
    绕过代理服务器以获取
    代理服务器设置中的本地地址

我找到了让它工作的方法。在C:\程序文件\微软Team Foundation Server 14 \应用层\Web服务中,有一个TFS Web Services使用的Web.CONFIG文件。 您应该对其进行编辑并添加以下内容:

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

设置此选项后,我的新闻加载正确,日志中不再出现错误

希望有帮助

马里奥