I am trying to run ASP MVC application with SSL mode set to true and whenever i run the application, i get prompt to trust the IIS Express SSL certificate. Upon clicking Yes
After having struggled with this issue now for a week (using Win 10 and Visual Studio 2019 Community Edition Version 16.1.1) and trying various solutions I found out the following:
Repairing IISExpress 10 (Programs -> Programs and Features) will create a new localhost certificate also in: Certificates (Local Computer) -> Personal
Then export that certificate by saving it to a file using:
Then import that certificate into: Certificates (Local Computer) -> Trusted Root Certification Authorities
I also tried to use "dotnet dev-crts https --trust" but that did not work for me and always produced the following error:
So to wrap it up: make shure there is only 1 localhost certificate which is in Certificates (Local Computer) -> Trusted Root Certification Authorities
Update: I just realized that after modifying the web application a few times a different error manifested and I had to go through the whole process again in order to get it to work!