Recently I ran into a problem with using Certificates to upload my project to Windows Azure. I was doing something wrong over and over again, so I thought I’d post the correct way of doing it. It’s something I’ve done many times, but on setting up a new computer I had to do it again for the first time in a while and ran into a brick wall. If you get the same error it will read like:
When you want to upload to Azure, for security Visual Studio Tools for Windows Azure require the use of a certificate. You must enter a certificate before you can upload your project with the Visual Studio Tools.
Select from the Credentials drop down the option to <Add> a new Credential:
Now you can select or create a certificate for use with these credentials:
You will see any existing certificates in this list, mine has a few – yours may be empty. However for this example we will create a new Certificate, so select <Create> and enter a friendly name:
Now you will be taken back to the Windows Azure Project Management Authentication screen with the certificate selected. Now you must open up the Management Portal at http://windows.azure.com and upload the newly created certificate to the Portal. The shortcut to doing this is to click the first and then second link at point 2 of the below dialog:
In the portal, make sure you go to the Management Certificates section. This was where I was going wrong! I was adding a certificate to a Hosted Service rather than the overall Management Portal.
Click the Add Certificate button at the top left of the screen, select the subscription to use and browse to the certificate in this location:
Clicking “Done” will create the certificate, and then you will be able to upload your project to Windows Azure.
Done indeed!
How not to do it!
Just to be clear, I was adding my certificate to the wrong place:
This Certificates Node is used to manage a particular instance set, for things such as Remote Desktop.
It’s pretty easy to go wrong, but easy to notice that you have once you know what to look for – make sure your certificate upload dialog doesn’t contain a Password field! This is because the certificate for upload and a certificate for remote desktop are different (the remote desktop contains the private key):
Had I been a little more awake, I probably would have thought in more depth about why I didn’t know what the password was! However, if you specify a .cer file in here, the portal doesn’t need to use it, and so won’t mind that you just made it up! Trying to use this will result in the error message:
If you run into this issue, just delete the certificate from within your Hosted Services subscription and instead add it to the Management Certificates part of the Portal.
Also, it’s probably time to get another coffee
It certainly was for me!
Stop Press!
As I was writing this, there was an update by David Hardin on a very similar subject: http://blogs.msdn.com/b/davidhardin/archive/2011/01/18/azure-ssl-verses-management-api-certificates.aspx
Andy











Thank u very much!!!!! I have watched a few vidoes and NON of them mention this. Thank u!!!!!!
Thank you so much!! I was going crazy trying publish. Something so simple! Thank you!
They need to do a better job with their instructions and stress that it is a management certificate. Mine was greyed out until I deleted my hosted service…so I ended up what you did.
Thanks!
you saved me again Andy
Neil
Andy,
This was a great walk through! I was going through the same issue and this helped me getting it working.
Thanks.
Hey,
Great post, it was of great help to me!
Great post on your experience Andy.
You might also want to see an overview of why this is. hopefully, http://j.mp/tbNs7u may help.
regards. Benjamin
Thanks a ton Andy. It is always the simple things which are the most complex to find answers to. I spent hours doing this mistake before I found your post.
Thanks a Lot
Great you saved my afternoon, a pitty the pictures are broken. Please we need more indepth blog like this to stay up for futre reference.
Thanks again!