1

I installed Win 10 pro v1803 and Visual Studio 2019, and when I tried to run a newly created .NET web application, I get the following message:

This project is configured to use SSL. To avoid SSL warnings in the browser you can choose to trust the self-signed certificate that IIS-Express has generated.

Would you like to trust the IIS Express SSL certificate?

And after I click yes, I get:

Adding the certificate to the Trusted Root Certificates store failed with the following error:

The access control list (ACL) structure is invalid.

I've tried removing the certificate from 'manage computer certificates' and repair IIS Express 10 from control panel, but it didn't work.

Also, when I run another web application, that I had saved on another laptop and copied it on the current one, I don't get this error.

Pang
  • 9,564
  • 146
  • 81
  • 122
shade1337
  • 83
  • 1
  • 2
  • 9

2 Answers2

4

I had to do 3 things and it worked for me.

  1. uninstall iis express from (control panel | Program and Features)
  2. download and reinstall (IIS) 10.0 Express from here https://www.microsoft.com/en-us/download/confirmation.aspx?id=48264
  3. copy localhost certificate from
    • Certificates (Local computer) | Personal | certificates and copy into
    • Certificates (Local computer) | Trusted Root Certification Authorities

Restart vs (i am using 2019 and vs preview 2019) and any open browsers.

Krishna M
  • 41
  • 3
0

I've just fixed this by exporting the certificate from Microsoft Management Console (Personal folder), but I did not delete it from the Personal folder.

I've then imported the certificate to the Trusted Root Certification Authorities, restarted the computer, opened Visual Studio, ran the project, ignored the warning and it worked.

Jakub Loksa
  • 537
  • 1
  • 14
  • 32
  • 1
    When I try to re-import the exported certificate into the *Trusted Root Certification Authorities* I get the error message "The import failed because the store was read-only, the store was full, or the store did not open correctly.". – Martin Braun Aug 28 '19 at 11:56