To eliminate the security warning when browsing and debugging HTTPS on localhost, Visual Studio added a dialog to allow Internet Explorer, Edge and Chrome to trust the self-signed IIS express SSL certificate.
For example, a web project property can be set to use SSL. Click F4 to bring up the properties dialog. Change SSL Enabled to true. Copy the SSL URL.

Set the web project property page web tab to use the HTTPS based URL (The SSL URL will be https://localhost:44300/
unless you've previously created SSL Web Sites.)

Press CTRL+F5 to run the application. Follow the instructions to trust the self-signed certificate that IIS Express has generated.

Read the Security Warning dialog and then click Yes if you want to install the certificate representing localhost.

The site will be shown in IE or Chrome without the certificate warning in the browser.

Firefox uses its own certificate store, so it will display a warning.