azure - 从 tfs 预览部署到 Windows Azure 云服务时出错

标签 azure tfsbuild

我已按照下面链接中描述的步骤创建从 tfs build 到 windows azure 的持续交付: https://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-tfs/

tfs无法部署到azure云服务并给出以下错误的问题:

An attempted http request against URI https ://management.core.windows.net/...-1b8d-49ae-9d78-.../services/hostedservices/myhostedservicename/deploymentslots/Staging returned an error: (400) Bad Request.
Additional Exception Information:
Error Code: BadRequest
Message: The certificate with thumbprint 96a.... was not found.

The Create Deployment operation threw an unexpected exception.
The deployment failed. Check the logs for exceptions that may have caused this failure.

Exception Message: An attempted http request against URI https: //management.core.windows.net/474...f4/services/hostedservices/myhostedservice/deploymentslots/Staging returned an error: (400) Bad Request.

Additional Exception Information:

Error Code: BadRequest

Message: The certificate with thumbprint 6789... was not found. (type AzureHttpRequestException)

Exception Stack Trace:    at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

最佳答案

我能想到两件事:

  1. 您的服务配置有一个证书,您需要在部署之前将其上传到云服务。
  2. 当您从 Azure 管理门户设置持续部署时,它会创建证书并上传您的 Azure 订阅的证书,以将您的 TFS 帐户连接到您的 Azure 帐户,这与 Visual Studio 设置发布功能时的方式非常相似云服务项目。因此,如果您正在清理 azure 下标中的证书,您可能已经删除了 tfs 用于部署的证书。要解决此问题,请转到 tfs 中的团队项目并单击设置图标,这应该会打开一个新选项卡来设置团队项目,如果单击服务选项卡,您会看到 azure 连接。要解决此问题,请单击“断开连接”,然后转到 Azure 门户,并从云服务的仪表板选项卡重新设置与云服务的连接,就像您第一次执行的操作一样。

我希望这会有所帮助。

关于azure - 从 tfs 预览部署到 Windows Azure 云服务时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16075450/

相关文章:

c# - TFS 更改构建代理工作目录

TFS 2010 Build,不断掉落位置,随机访问问题

visual-studio-2012 - 使用数据库项目在tfsbuild中生成错误

Azure Kubernetes 服务 (AKS) 和主节点池

用于连接到 Azure VM 上运行的 SQL 服务器的 Azure Runbook

nuget - VSTS 自动构建 NuGet 打包器/发布器

azure - 从 Visual Studio Online 将 ASP.NET 5 构建到 Azure 网站 ERROR_FILE_IN_USE

azure - 如何向容器添加过滤器以删除虚拟文件夹中除某些 Blob 之外的 Blob?

azure - 如何在 vscode azure 函数中包含资源文件?

azure - 为什么这些 Azure 权限不起作用?