Windows Azure Platform Family of articles Catalog
At some point, we need to configure an HTTPS connection on the Azure PaaS Cloud service. This chapter describes how to create a certificate locally and then use HTTPS to connect to Azure Cloud Service.
1. Create a certificate
run cmd as Administratorand install Azure certificate using the MakeCert command. The specific commands are as follows:
" cn=<certificatename> " " <certificatename>.cer "
For example, I created a certificate called Sslcertificate.
" cn=sslcertificate " " Sslcertificate.cer "
2. Export the private key
In the run, enter mmc.exe.
In the console, select file, add Delete snap -in, add "Certificates", and select "My user account".
Expand Certificates -Current user,Personal,certificates. Select Sslcertificate, right -click,"All Tasks"and click "Export".
Select Yes, export the private key, and enter your own private key (this article uses 123456). then save the PFX to the root directory of the C drive and rename it to privatecertificate.pfx.
3. Create an empty cloud Service
In Windows Azure Portal, create an empty cloud service named Leissl. Such as:
4. Click Cloud Service, select the Leissl I created in step three, then click Certificates, and finally select upload a certificate
Once the upload is complete, you can view the thumbprint, such as:
5. Upload the file we saved in C:\PrivateCertificate.pfx and enter the private key you exported in step two. Such as:
6. Then, on-premises, use administrator status to run VS2013. Create a cloud Project, and add the ASP. NET Web Role
7. In the project file, select Windowsazure1,role, double-click WebRole1
8. In the Certificates menu bar, click Add Certificate to enter the thumbprint of step 4 into the cell
9. Click the Endpoints menu bar, click Add Certificate, set the name to Httpsendpoint,protocol to https, SSL Certificate Name Select the Certificate1 that I created in step 8
10. Once setup is complete, publish cloud Service with VS2013
For steps on publishing, refer to [Sdk2.2]windows Azure cloud Service (35) Publishing Azure cloud service with VS2013
11. We can access the successfully published application via https://leissl.cloudapp.net:8080/
Windows Azure Cloud Service (36) Configure SSL Certificates in Azure cloud service