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
I'm a total noob on this and wanted to share the solution I found after struggling some time and reading many posts. It is very similar to what sanjeev posted, however with more detail so if you are new to this (as myself), you can solve it faster.
If you have this issue with Visual Studio 2019 and Win 10, delete all localhost certificates at MMC: (1) cmd>run as admin>type "mmc" and press enter (2) File>Add/Remove Snap-in... (3) Select "Certificates" and click Add button (4) Select options "Computer Account" and "Local computer" (5) Console Root folder > click and expand Certificates (6) Delete all localhost certificates at different folders
Then at Control Panel>Program and Features find IIS 10.0 Express at the list, right click and select "Repair". This will create a new localhost certificate at the Certificate's "Personal" folder (at the MMC window used previously - don't forget to refresh to see this new certificate)
Copy (right click on the certificate) this certificate located in the "Personal" folder and paste it into the folder "Trusted Root Certification Authorities">"Certificates"
DELETE the localhost certificate from the "Personal" folder. There should be only one localhost certificate and located at the "Trusted Root Certification Authorities" folder
After this, it should work fine, hope you find this useful