Visual Studio 2017 gives "Adding a certificate to the trusted root certificate store with an error with the following Errror"

I try to start an ASP MVC application with SSL mode set to true, and whenever I start the application, I get an invitation to trust the IIS Express SSL certificate. After clicking “Yes”, the error message “Adding a certificate to the trusted root certificate store failed with the following error. Access denied.” I use Visual Studio 2017 in administrator mode. I also deleted the localhost certificate by going to MMC. Someone Has anyone else encountered this problem.

Error screenshots

: , . . IIS Express . localhost Personal/Certificate Trusted Root Certificates, .

+19
5

: .

, . . IIS Express . localhost Personal/Certificate Trusted Root Certificates, .

/ IIS Express, -, ( IIS Express 10), localhost Trusted Rood.

, , : https://blogs.iis.net/robert_mcmurray/how-to-trust-the-iis-express-self-signed-certificate

,

  • " " certlm .
  • > localhost
    • ! .
  • .
+9

, CMD> certlm localhost .

+6

:

  • " "
  • .

.

+1

( Win 10 Visual Studio 2019 Community Edition 16.1.1) , :

  • IISExpress 10 : ( ) →

enter image description here

  • IISExpress 10 ( → ) localhost : ( ) →

  • , , :

enter image description here

: ( ) →

enter image description here

"dotnet dev-crts https --trust", :

enter image description here

, : , 1 , ( ) →

Update: I just realized that after changing the web application, a different error occurred several times, and I had to go through the whole process again to get it to work!

0
source

My mistake was actually “asp.net developer certificate not installed”, but I think the solution below will work in this case. Run the following commands at a command prompt.

dotnet dev-certs https --trust --check
echo Trust check: %errorlevel%
dotnet dev-certs https --trust -ep "%APPDATA%\ASP.NET\https\TestCert.pfx" -p TestPassword
echo Trust/Export: %errorlevel%

Link: https://github.com/Microsoft/DockerTools/issues/147#issuecomment-420433974

0
source

Source: https://habr.com/ru/post/1689619/


All Articles