3
votes

I have followed the steps described in the link below to create Continuous delivery from tfs build to windows azure: https://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-tfs/

the problem that tfs fails to deploy to azure cloud service and gives me the following error:

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)
3
Did you ever figure this out? I'm having the same issue.Kyle
Not yet, i'm using manual deployment. If i found a solution i'll purplish it.Mustafamg

3 Answers

3
votes

I can think of two things that it could be of the top my head:

  1. Your service configuration has a cert that you need to upload to the cloud service before you deploy.
  2. When you setup continuous deploy from the azure management portal, it creates cert and uploads the cert your azure subscription to connect your TFS account to you azure account, much the same way that visual studio does is when you setup the publish feature of the cloud service project. So if you were cleaning up certs in you azure subscript you might have delete the cert that tfs uses to deploy with. To fix this go to the team project in tfs and click the settings icon, this should open a new tab to the setting of the team project, if you click the services tab you see the azure connection. To fix this, click disconnect, then go to the azure portal and re-setup connection to cloud service from the dashboard tab of the cloud service the same you did the first time.

I hope this helps.

1
votes

I followed this advice http://teelahti.fi/howto-deploy-to-azure-websites-deployment-slot-from-tfs/ to use this pattern mywebsite(slotname)

So if your website is MySite, and you created a slot "Staging" use MySite(Staging) in the "Web site name:" of the "Windows Azure Deployment Settings" in the "Process" tab of the build definition.

0
votes

I had the same issue and it was cause by having the Remote desktop configuration enabled on my cloud project. You have 2 options:

  1. Remove your remote desktop connection by right clicking your cloud project and click Configure Remote Desktop.... Then un-tick Enable connections for all roles and click OK. Now check in those changes for the build to run
  2. Ensure that the certificate you use under Configure Remote Desktop.... has been uploaded to the azure portal under Settings and Management Certificates

Hope this helps