Windows Azure Web Sites : Cannot upload a Self-Signed Certificate created with PowerShell

As SSL functionality was added to Windows Azure Web Sites, I started playing around with it. I was trying to upload self-signed certificates when I ran into a issue.

I created a self-signed certificate using Windows PowerShell ISE ( New-SelfSignedCertificate Module ) . Below is a snippet of the command I ran:

New-SelfSignedCertificate -CertStoreLocation cert:\LocalMachine\My -DnsName www.kaushalz.com

I exported the certificate in the PFX format and then tried uploading the certificate to WAWS.

image

But it threw an error as shown below:

image

I clicked on DETAILS, and it showed up this.

image

Out of curiosity I wondered if WAWS allowed self-signed certificates to be uploaded. So I created a self-signed certificate via IIS Manager and exported it in PFX format and tried uploading it on to WAWS. This was successful, no errors at all.

Even a self-signed certificate created using selfssl.exe tool could be uploaded to WAWS.

It seems that the certificate created using PowerShell misses keyset permissions which doesn’t work well with WAWS. I see this as a limitation with PowerShell. However, I’m no PowerShell expert to confirm if nothing can be done further.