Nov 23, 2012

Azure Deployment of Certificate fails

I came accross an issue today where I wanted to deploy a .NET 4.5 (osVersion=”3”) cloud service using a self-signed SSL certificate to protect the web service traffic:

11:55:44 AM - Preparing deployment for <solution> - 11/23/2012 11:55:30 AM with Subscription ID ‘<subscription>' using Service Management URL 'https://management.core.windows.net/'...
11:55:44 - Connecting...
11:55:46 - Warning: Error: Certificate: ‘SSLCertificate’ with Thumbprint: <thumbprint> for Role: <solution>Service has not been uploaded to the cloud service: <solution>.
11:55:46 - The deployment cannot be completed because it requires certificates or OS images which are not present in the cloud.
11:55:46 - Deployment failed with a fatal error

I investigated around my projects certificate settings, thumbprint or certificate store location – in vain. Then I solved the problem:

  • Go to the Azure portal and upload the pfx file directly into your cloud service (certificate tab)

image

  • After this manual upload the deployment will succeed

NOTE

Looks like this being by design: conforming to some best security practices where developers should not have access to the production certificates – so deployment stops here. Took me some time so see it – but is perfectly true.