localhost ssl certificate error in visual studio 2022 .net 6

Code Example - localhost ssl certificate error in visual studio 2022 .net 6

                
                        In case we need to recreate the development localhost SSL certificate from scratch, the simplest thing is to use the appropriate command provided by the dotnet CLI:

> dotnet dev-certs https --trust