2016-03-03 127 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

相關問題