I configured SSL on IIS 7 for my ASP.NET website. But its giving error that Server certificate does not match the URL, even after providing the same name “localhost” in certificate friendly name as that of my server.
I also changed the name of the server as ASP-DELL i.e. the name of my computer and created a certificate with that name and started the website as http://ASP-DELL/HC/index.aspx but it still showing this in Google Chrome:
Please help!
What’s missing (or at least unclear) in your question is what the common name (not friendly name) of the certificate you installed/purchased/configured….
Certificates are issued to a specific common name/host name, and the url must match it specifically.
Until SANs (subject alternative name) became common, I recall the days when one had to purchase 2 certificates for the “www” web site and the “site without the www”. These days there are also “wildcard certificates”.
Its also unclear what type of certificate you are referring to, self-signed/test or is it something you purchased? I wouldn’t think a certificate provider will let you purchase a certificate with a common name of “localhost” (but then again I could be wrong).
In production, certificate common name will equate to your DNS fully qualified url -e.g: