'IIS Web Site working fine with HTTP but not with HTTPS

My site working fine with HTTP (On localhost) but when i run this on https it says .

This site can’t be reached localhost refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED

Following are the action that i did #1.site is running on localhost on 443 port #2.Generated self signed certificate

Please let me know what is causing the issue

Regards,

iis


Solution 1:[1]

Make sure the site is accessible using HTTP.

set up the iis site binding as below to make it work using https:

enter image description here

if you have purchased a domain name then you can add it in the host name field.

if you are running the site in an Azure virtual machine make sure you have added 443 port in the azure firewall setting.

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 Jalpa Panchal