In this post we created Azure Web application and mapped it to our custom domain name,in this one we’ll secure our site with SSL certificate.In real world we should use SSL cert from commercial trusted Certification Authorities, in this example i used self-signed certificate , just for testing purposes.
Create certification request, create file with inf or txt extension
[NewRequest] Subject = "CN=ASTRAHOME.XYZ" Exportable = TRUE KeyLength = 2048 KeySpec = 1 KeyUsage = 0xA0 Provider Name="Microsoft RSA Channel Cryptographic Provider" ProviderType = 12 HashAlgorithm = SHA256 RequestType = Cert ValidityPeriod = Years ValidityPeriodUnits = 1 MachineKeySet = true [EnhancedKeyUsageExtension] OID=1.3.6.1.5.5.7.3.1
Open CMD as admin and type:
certreq -new ssl.inf ssl.crt
Now open Certificate manager-Computer account
Our certificate should be created under Personal-Certificates
Now, export it:
Export Private key
Select Include all certificates in the certification path if possible
and Export all Extended properties
And save it somewhere
In Web app properties click SSL Certificates-Upload certificates
Browse to path where you exported certificate
Click Add binding
Select hostname and certificate,leave SSL type-click Add binding
Because it’s self-signed certificate we get warnings, but we can access to web app using HTTPS access