Whats new in Windows Azure SDK 1.5 - Using CSUPLOAD tool to upload service certificates for your Windows Azure Application

As you can see below is the certificate, already installed in my machine and I want to upload as my Service Certificate to Azure Portal. Before the release of Windows Azure SDK you would have to upload certificate directly to portal however using Windows Azure SDK 1.5 based CSUPLOAD tool, you can upload the certificate directly.

 

The command line is as below:

 >csupload add-servicecertificate

-Connection "SubscriptionID=<YOUR_SUBSCRIPTION_GUID>;CertificateThumbprint=<Management_Certificate_Thumbprint>"

-HostedServiceName "<Your_Hosted_Service_Name>"

-Thumbprint "<Service_Certificate_Thumbprint>"

 

Example:

Here is the certificate which I would like to upload in my service certificate section:

Here is my Windows Azure Service Certificate list look like before uploading:

 

Here is the actual command output:

 C:\Program Files\Windows Azure SDK\v1.5\bin>csupload add-servicecertificate -Connection "SubscriptionID=<YOUR_SUBSCRIPTION_ID>;CertificateThumbprint=A77B40E35556DFDB09C3B246453A548B2D7B9444" -HostedServiceName "avkashchauhan" -Thumbprint "673eb3d86c3fb01bc58c06915c50cb01cb879a9b"
 
 
 Windows(R) Azure(TM) Upload Tool version 1.5.0.0
 for Microsoft(R) .NET Framework 3.5
 Copyright (c) Microsoft Corporation. All rights reserved.
 
 arg[0]="add-servicecertificate"
 arg[0]={ 97, 100, 100, 45, 115, 101, 114, 118, 105, 99, 101, 99, 101, 114, 116,
 105, 102, 105, 99, 97, 116, 101 }
 arg[1]="-Connection"
 arg[1]={ 45, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110 }
 arg[2]="SubscriptionID=<SUBSCRIPTION_ID>;CertificateThumbprin t=A77B40E35556DFDB09C3B246453A548B2D7B9444"
 arg[3]="-HostedServiceName"
 arg[3]={ 45, 72, 111, 115, 116, 101, 100, 83, 101, 114, 118, 105, 99, 101, 78, 9
 7, 109, 101 }
 arg[4]="avkashchauhan"
 arg[4]={ 97, 118, 107, 97, 115, 104, 99, 104, 97, 117, 104, 97, 110 }
 arg[5]="-Thumbprint"
 arg[5]={ 45, 84, 104, 117, 109, 98, 112, 114, 105, 110, 116 }
 arg[6]="673eb3d86c3fb01bc58c06915c50cb01cb879a9b"
 arg[6]={ 54, 55, 51, 101, 98, 51, 100, 56, 54, 99, 51, 102, 98, 48, 49, 98, 99,
 53, 56, 99, 48, 54, 57, 49, 53, 99, 53, 48, 99, 98, 48, 49, 99, 98, 56, 55, 57,
 97, 57, 98 }
 
 Uploading service certificate to 'avkashchauhan'.
 Service certificate upload complete.
 FriendlyName :
 Thumbprint : 673EB3D86C3FB01BC58C06915C50CB01CB879A9B
 Subject : CN=Avkash Azure Cert2048
 IssuedBy : CN=Avkash Azure Cert2048
 ValidFrom : 9/1/2011 12:00:00 AM
 ValidTo : 12/31/2017 11:00:00 PM
 HasPrivateKey : True

Here is the certificate uploaded in my Service Certificate section:

 

If you want to learn how to create a 2048 bit certificate with exportable private key visit blog below:

https://blogs.msdn.com/b/avkashchauhan/archive/2011/09/21/how-to-generate-2048-bit-certificate-with-makecert-exe.aspx

 

More info about CSUPLOAD Tool:

https://msdn.microsoft.com/en-us/library/gg466228.aspx