0

Recently, I've been working on a project which signed data using certificates. Since then my trusted certificates (Including .net development certificate) are getting deleted rapidly. Using dotnet dev-certs https --trust I have to repeat trusting the certificate (and it is getting deleted after 2 or 3 seconds over and over at the same time) before my application startup is done. If I can find the key moment when I need to trust the certificate, it's all good. If not, the following exception is thrown on startup end:

System.InvalidOperationException: 'Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date. To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.'

It's been really irritating and I need to find the source of this issue. I also have used certmgr.msc and can confirm my certificates are removed from /Current User/Personal/Certificates/ every 2 to 3 seconds.

Bamdad
  • 726
  • 1
  • 11
  • 28
  • Could you follow [the steps in this post](https://stackoverflow.com/a/56112421/7687666) to solve the issue, it should be useful. – Jason Pan Nov 07 '22 at 05:28
  • Yes. Doesn't change anything. My problem is losing my certificates continuously, not once. – Bamdad Nov 08 '22 at 07:56
  • Please update your visual studio to latest version. Then check again. By the way, you also can update your .net version. – Jason Pan Nov 08 '22 at 08:00
  • I think you're missing the point here. My visual studio is updated to the latest version and I have the latest version of dotnet too. I need to investigate the reason behind my problem (The process that deletes the certificates), maybe through windows event log or something. – Bamdad Nov 08 '22 at 08:11

0 Answers0