gpt4 book ai didi

TFS 2015 本地 : web extension failing to load over https - (The request is not supported)

转载 作者:行者123 更新时间:2023-12-02 04:41:06 26 4
gpt4 key购买 nike

当 TFS 实例使用 https 协议(protocol)在 Internet 上公开时,我需要有关使用 TFS Web 扩展的具体指导。

背景:我使用 rest api 开发了一个 TFS 2015 网络扩展,并使用 tfs-cli 将其安装在我们的 tfs 集合中。

安装并启用扩展后,我加载了这个扩展;它抛出以下错误

“Error Code: 500 Internal Server Error. The request is not supported. (50)”.

在分析过程中,我发现问题与我们通过 http 和 https 配置的 TFS 有关。

我在其他第 3 方扩展程序(如 FolderManagement)中遇到了同样的错误和 Team Calendar通过 https。这些扩展在我们的 TFS 2015 实验室环境中运行良好,该环境仅通过域上的 http 公开。


*让我们以市场上可用的 FolderManagement 扩展为例。*

尝试 1 - 之前的配置:

我们有一个外部 url 说 https://tfs.companyname.com/tfs 在 TMG 中注册,它将所有流量路由到我们的内部 TFS 实例说 http://machinename:端口/tfs

在 TFS 管理控制台通知 url 设置为 https://tfs.companyname.com/tfs

当我们在 TFS web 中访问扩展时,它没有加载,在浏览器调试中我们得到以下错误:

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 时,所有扩展都开始正常工作。

然而,当我们访问外部 url https://tfs.companyname.com/tfs 时,扩展不起作用,因为 TMG 将流量从安全 (https) 转发到不安全 (http) 并导致授权问题。

尝试 3 - 当前配置:

在 TFS 服务器上,我们将 https 绑定(bind)(端口 443)添加到 “Team Foundation Server” 网站并分配了有效证书。旁注 - 证书是通配符 *.companyname.com 支持站点的公开 dns 条目。

在 TFS 管理控制台中,通知 url 设置为 https://tfs.companyname.com/tfs 并且服务器 url 也设置为 https://tfs.companyname.com/tfs

外部 url https://tfs.companyname.com/tfs 正在通过 443 端口将流量路由到 TFS 服务器(机器 IP)。

现在当我们在 TFS web 中访问扩展时,它显示与前面提到的相同的错误,即

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 上得到了相同的行为/错误。

问题:为什么当所有配置都以通过 http 托管的 TFS 安装为目标时,扩展按预期工作,但当通过 https 公开时,web 扩展的行为不同?

最佳答案

我不得不说 http 和 https 都可以在相同的配置下很好地工作,因为 web 扩展是不可能的。在部署 Web 扩展之前尝试以下配置。

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.

有关带 TFS 的 HTTPS 的更多详细信息,请参阅此 MSDN 链接:Set up HTTPS with Secure Sockets Layer (SSL) for Team Foundation Server

关于TFS 2015 本地 : web extension failing to load over https - (The request is not supported),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37542113/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com