When I try to run this app locally (when the SSL is enabled),

I always get this page that complains about Secure Connection:
https://localhost:44300/
Secure Connection Failed
An error occurred during a connection to localhost:44300. PR_CONNECT_RESET_ERROR
- The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
- Please contact the website owners to inform them of this problem.
What I've tried so far:
- Add a self signed
localhostcertificate with this Power Shell command:
New-SelfSignedCertificate -DnsName "localhost" -CertStoreLocation "cert:\LocalMachine\My"
- Run
mmc.exeand export thatcertificatecreated by above Power Shell script from
[Console Root\Certificates (Local Computer)\Personal\Certificates]
to
[Console Root\Certificates (Local Computer)\Trusted Root Certification Authorities\Certificates.
This hasn't worked so far. If I run the app unchecking the Enable SSL, it works fine.
Please advise on a possible solution for SSL enabled environment.