2016-05-31 54 views
3

我需要使用TFS web擴展的時候,而TFS實例被暴露在使用HTTPS互聯網協議的有關具體指導。TFS 2015年的預置型:web擴展無法加載通過https - (請求不被支持)

背景:我使用rest api開發了一個TFS 2015網絡擴展,並使用tfs-cli將它安裝在我們的tfs集合上。

安裝並啓用擴展後,我加載此擴展;它會拋出以下錯誤

「Error Code: 500 Internal Server Error. The request is not supported. (50)」.

在分析過程中,我發現問題與我們通過http和https的TFS配置有關。

我遇到了其他第三方擴展一樣FolderManagementTeam Calendar超過HTTPS同樣的錯誤。這些擴展在我們的TFS 2015實驗室環境中工作良好,該環境僅在域上的http上暴露。 。


*讓我們例子在市場上可用的FolderManagement擴展的*

嘗試1 - 以前的配置:

我們外部URL說https://tfs.companyname.com/tfs在TMG註冊這是路由所有流量到我們的內部TFS實例說http://machinename:port/tfs

在TFS管理控制檯通知URL設置爲https://tfs.companyname.com/tfs

當我們訪問的網絡TFS擴展,它沒有加載和瀏覽器的調試,我們得到了以下錯誤:

GET https://tfs.companyname.com/tfs/_apis/public/gallery/publisher/ms-devlabs/extension/FolderManagement/1.1.10/assetbyname/main.html 「Error Code: 500 Internal Server Error. The request is not supported. (50)」.

嘗試2:

然後,我改變TFS通知URL在管理控制檯指向內部實例http://machinename:port/tfs

現在當我們使用http://machinename:port/tfs訪問我們的TFS時,所有擴展都開始正常工作。

但是,當我們訪問外部網址https://tfs.companyname.com/tfs時,由於TMG將流量從安全(https)轉發到不安全(http)並導致授權問題,擴展並不起作用。

嘗試3 - 當前配置:

在TFS服務器,我們添加HTTPS(端口443)結合「Team Foundation Server的」網站和指定有效證件。附註 - 證書通配*.companyname.com支持該網站暴露的DNS入口。

在TFS管理控制檯,通知UR​​L設置爲https://tfs.companyname.com/tfs 和服務器的URL也被設置爲https://tfs.companyname.com/tfs

外部URL https://tfs.companyname.com/tfs是路由流量TFS服務器(計算機IP)超過443端口。

現在,當我們在TFS網絡訪問的擴展,它顯示提到同樣的錯誤,前面即

GET https://tfs.companyname.com/tfs/_apis/public/gallery/publisher/ms-devlabs/extension/FolderManagement/1.1.10/assetbyname/main.html 「Error Code: 500 Internal Server Error. The request is not supported. (50)」.

鑑於當前的配置我收到相同的行爲/錯誤HTTP和HTTPS。

問:爲什麼推廣工作按預期在所有配置的目標是一個TFS安裝託管通過HTTP但是當暴露在HTTPS web擴展行爲有所不同?

+0

什麼是你TFS服務器的URL您使用? http或https?打開Team Foundation Server管理員控制檯。檢查服務器的網址 –

+0

我使用的是https url。在Team Foundation Sever管理員控制檯服務器url中設置爲「https:// tfs.companyname.com/tfs」。如果可能的話,我希望TFS 2015 web擴展可以爲http和https url配置工作。 –

回答

0

我不得不說,http和https可以很好地工作在相同的配置下進行網絡擴展是不可能的。在部署您的網絡擴展之前,請嘗試下面的配置

Configuring Your Deployment to Require HTTPS with SSL (Optional)

You can require all connections to the TFS application tier to use HTTPS with SSL. This additional security is optional but recommended.

To require SSL connections

1.On the server that hosts the website that you want to configure, choose Start, choose Administrative Tools, and then choose Internet Information Services (IIS) Manager.

2.Follow the appropriate steps for your version of IIS:

For deployments that use IIS 7.0:

a.Expand ComputerName, expand Web Sites, and then choose the website that you want to configure.

b.On the home page for that website, choose SSL Settings.

c.In the SSL Settings pane, select the Require SSL check box.

(Optional) Select the Require 128-bit SSL check box.

d.In Client Certificates, choose Ignore, Accept, or Require, depending on the security requirements of your deployment.

e.In Actions, choose Apply.

f.Repeat these steps for each website for which you want to require SSL.

更多HTTPS TFS的詳細信息,請參閱此MSDN鏈接:Set up HTTPS with Secure Sockets Layer (SSL) for Team Foundation Server

+0

嘗試了建議的解決方案,但網絡擴展無法正常工作。結果與上述問題相同。 –

0

這竟然是TMG相關的問題。 TFS配置是正確的。 非常感謝所有幫助過我的人。這個問題現在可以關閉。

+0

什麼是TMG? (添加角色以完成對評論的荒謬和任意的最小十五個字符的限制) – pabrams

0

我相信這是產品中的一個錯誤。由於一些奇怪的原因(不好的做法),決定編寫這些圖像URL的人沒有遵守當前的瀏覽器URL。這將是非常簡單的,如果他們只寫了一個相對的網址。

在我的情況下,有一個公共https網址https://team.devscope.net/tfs/_api ...和一個內部https:// *:8080/tfs,但該產品剛發明了一個不受保護的/名爲http://team.devscope.net:8080/tfs/_apis的新網址。

結果就是在瀏覽器中的錯誤: enter image description here