Skip to content

My Windows Azure Web Deploy Stopped Working Because My Certificate Expired

Updated: at 11:18 PM

This is one of those things that you do once every year or so and it is very easy to forget how to do it the next time. I’d almost prefer my Cert’s to expire every week so I get in the swing of fixing it (just kidding).

So, I tried do a web deploy to my Windows Azure Instance this morning and I got a cryptic error that I blogged about here:

It looks something like this:


Error 1 Web deployment task failed.(Remote agent 
(URL could not be
contacted. Make sure the remote agent service is installed and started on the target computer.)
Make sure the site name, user name, and password are correct. If the issue is not resolved,
please contact your local or server administrator.
Error details:
Remote agent (URL
could not be contacted. Make sure the remote agent service is
installed and started on the target computer.
An unsupported response was received. The response header 'MSDeploy.Response' was
'' but 'v1' was expected.
The remote server returned an error: (401) Unauthorized.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets 3847 5 Web
They key is really one word.  (401) Unauthorized.  The rest is just confusing.  What tipped me off is that I tried to remote into the session with RDP and I got an error that says “username password expired”.
So, here are the steps to re-up your password expiration.  I got this from the post here:

Here we go.
First, right click on your azure project and choose publish.
Then, choose “Configure Remote Desktop connections”.
From there, make sure “Enable connections for all roles” is checked, then choose the bottom choice “Create”.
Give your cert a new name.
Make sure you set the expiration date far in the future.
Don’t press OK!!! instead, click on the “View button next to your new cert in the dialog above
Select the button “CopyToFile”
Make sure you say “Yes, export the private key in the next dialog”.
Take the default for the next choice.
Retype in your password from the dialog 4 back.
Finally, give it a filename where you want to export your cert.
Press Finish.
You get rewared wih…
Press OK to the next message
And now, you can deploy your package!!!
(and, don’t forget to update your certificate into your windows azure portal and delete the old one)
Clear as mud, right?
I wonder if this is so hard on mac’s.?