我已按照下面链接中描述的步骤创建从 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)
最佳答案
我能想到两件事:
- 您的服务配置有一个证书,您需要在部署之前将其上传到云服务。
- 当您从 Azure 管理门户设置持续部署时,它会创建证书并上传您的 Azure 订阅的证书,以将您的 TFS 帐户连接到您的 Azure 帐户,这与 Visual Studio 设置发布功能时的方式非常相似云服务项目。因此,如果您正在清理 azure 下标中的证书,您可能已经删除了 tfs 用于部署的证书。要解决此问题,请转到 tfs 中的团队项目并单击设置图标,这应该会打开一个新选项卡来设置团队项目,如果单击服务选项卡,您会看到 azure 连接。要解决此问题,请单击“断开连接”,然后转到 Azure 门户,并从云服务的仪表板选项卡重新设置与云服务的连接,就像您第一次执行的操作一样。
我希望这会有所帮助。
关于azure - 从 tfs 预览部署到 Windows Azure 云服务时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16075450/