Difference between revisions of "Creating a self-signed cert for localhost"

From Logic Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
  
 
Expand the Personal folder and you will see your localhost certificate:
 
Expand the Personal folder and you will see your localhost certificate:
 +
 +
  
 
[[File:Cert.png]]
 
[[File:Cert.png]]
 +
 +
  
 
Copy the certificate into Trusted Root Certification Authorities - Certificates folder.
 
Copy the certificate into Trusted Root Certification Authorities - Certificates folder.
 +
 +
 +
== dotnet ==
 +
dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\CoffeeAPI.pfx -p pa55w0rd!
 +
 +
dotnet dev-certs https --trust

Latest revision as of 09:43, 31 August 2021


Windows

First use the command in PowerShell as administrator:

New-SelfSignedCertificate -DnsName "localhost" -CertStoreLocation "cert:\LocalMachine\My"

Then go to:

File -> Add or Remove Snap-ins -> Certificates -> Add -> Computer account -> Local computer. Click Finish.

Expand the Personal folder and you will see your localhost certificate:


Cert.png


Copy the certificate into Trusted Root Certification Authorities - Certificates folder.


dotnet

dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\CoffeeAPI.pfx -p pa55w0rd!
dotnet dev-certs https --trust