'Site throwing Not Secure even after adding certificate

I have an old ASP.NET Web Forms application which is running under HTTP. I want to it to use HTTPS.

For this, I created a self-signed certificate from IIS and also added it under Certificates from MMC SnapIn.

In the IIS bindings, I have added https binding on port 443 and selected this certificate.

Still when I open with https, Chrome displays: "Site not secure". When I click on the error it says: "Certificate is not valid".

For a normal Web Forms application, any change required in code or Web.Config file as well ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source